Initial steps when inside a new Ubuntu VM
echo 'alias c="clear"' >> ~/.bashrc
echo 'alias l="ls -FCAlh"' >> ~/.bashrc
echo 'alias xx="exit"' >> ~/.bashrc
echo 'alias hg="history | grep"' >> ~/.bashrc
echo 'alias ca="conda activate"' >> ~/.bashrc
echo 'alias boa="python -m"' >> ~/.bashrc
echo 'alias ps3="pstree -phat"' >> ~/.bashrc
echo 'alias dus="du -h | sort -rh"' >> ~/.bashrc
echo 'alias gpll="git pull"' >> ~/.bashrc
echo 'alias gsta="echo \"--------------------\"; git status; echo \"--------------------\"; git lfs status"' >> ~/.bashrc
sudo apt update && sudo apt upgrade -y
sudo apt install htop vim
sudo apt autoremove -y
mkdir ~/downloads/temp -p
curl https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -o ~/downloads/Miniconda3-latest-Linux-x86_64.sh
TMPDIR=~/downloads/temp bash ~/downloads/Miniconda3-latest-Linux-x86_64.sh -u
Don't strictly need the TMPDIR
part.
- sometimes, conda install fails because
/tmp
on some VMs is set tonoexec
- https://stackoverflow.com/questions/60106630/conda-exe-error-while-loading-shared-libraries-libz-so-1
conda update --all
conda clean --all
# Is there a GPU?
sudo lshw -C display
Distilled from Nectar help page
lsblk
sudo mkfs -t ext4 /dev/vdX
sudo mkdir /data
Put below in fstab
:
/dev/vdX /data auto defaults,nofail 0 2
Then mount it:
sudo mount --all
sudo chown -R ubuntu:ubuntu /data