diff --git a/wsl.sh b/wsl.sh index 5aa15cf..41bd0ee 100644 --- a/wsl.sh +++ b/wsl.sh @@ -8,6 +8,10 @@ then sudo apt update sudo apt upgrade -y + # === Remove SU password == + sudo sed -i "26s#.*#%sudo ALL=(ALL:ALL) NOPASSWD: ALL#" /etc/sudoers + + # === Requirements == which git &> /dev/null || sudo apt install git -y # install git if not already installed which curl &> /dev/null || sudo apt install apt-transport-https curl -y # install curl (along with apt-transport-https) if not already installed which wget &> /dev/null || sudo apt install wget -y # install wget if not already installed @@ -161,15 +165,12 @@ then # === Shared folders == sudo mkdir /mnt/z && sudo mkdir /mnt/y - # === Remove SU password == - sudo sed -i "26s#.*#%sudo ALL=(ALL:ALL) NOPASSWD: ALL#" /etc/sudoers - # === Remove useless packages sudo apt purge needrestart -y # remove kernel update message (https://github.com/microsoft/WSL/issues/7054#issuecomment-864271333) sudo apt autoremove -y - echo -e "\nInstallation terminée !\nIl faut redémarrer WSL (dans Powershell = wsl -t Ubuntu)." + echo -e "\nInstallation terminée !\nIl faut redémarrer WSL (dans Powershell = wsl --shutdown)." echo -e "---\nPense bien à paramétrer ton terminal, exemple avec Windows Terminal :" echo "- Ligne de commande = wsl.exe -d Ubuntu fish" #printf "%s%s%s\n" "- Répertoire de démarrage = \\" "\wsl.localhost\Ubuntu\home\\" "$USER"