Changement commande pour éteindre WSL + Suppression du mot de passe root au début
This commit is contained in:
parent
b530d560e4
commit
5890d75001
1 changed files with 5 additions and 4 deletions
9
wsl.sh
9
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"
|
||||
|
|
Loading…
Reference in a new issue