Created
March 26, 2023 02:41
-
-
Save dranger003/b1b0d727cf14072ca169aeb2c2de4fc2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
# Update sudoers file | |
if [ -f /etc/sudoers ]; then | |
sudo perl -i -pe 's/(^%sudo.*)(ALL=\(ALL:ALL\) ALL)/$1ALL=\(ALL:ALL\) NOPASSWD:ALL/' /etc/sudoers | |
else | |
echo "/etc/sudoers not found, check your system configuration" | |
exit 1 | |
fi | |
# Update and upgrade packages | |
sudo apt-get update | |
sudo apt-get -y upgrade | |
# Install build-essential | |
sudo apt-get -y install build-essential | |
# Download and install Miniconda | |
if [ ! -d "$HOME/miniconda3" ]; then | |
wget -q --show-progress https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/Miniconda3-latest-Linux-x86_64.sh | |
bash ~/Miniconda3-latest-Linux-x86_64.sh -b -p $HOME/miniconda3 | |
rm ~/Miniconda3-latest-Linux-x86_64.sh | |
else | |
echo "Miniconda3 is already installed" | |
fi | |
# Initialize Miniconda | |
if [ -f "$HOME/miniconda3/bin/conda" ]; then | |
$HOME/miniconda3/bin/conda init | |
else | |
echo "Miniconda3 installation failed or not found" | |
exit 1 | |
fi | |
echo "======================================================================" | |
echo "DONE! Restart the terminal then run:" | |
echo "./install.sh" |
Author
dranger003
commented
Mar 26, 2023
- Make sure your WSL2 Ubuntu distro is brand new (i.e. delete your existing one with: wsl.exe --unregister Ubuntu)
- From Windows Terminal in the tab bar click the down arrow and select "Ubuntu" to start a new clean distro
- Copy this script into the distro then run it
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment