Skip to content

Instantly share code, notes, and snippets.

@danielTobon43
Created May 1, 2022 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danielTobon43/5e334fcefc6a0183b8881e0936aea2c7 to your computer and use it in GitHub Desktop.
Save danielTobon43/5e334fcefc6a0183b8881e0936aea2c7 to your computer and use it in GitHub Desktop.
Ubuntu 20.04 pre-configuration

Bash script to setup ubuntu initial steps for development.

  • zsh
  • wget
  • git
  • apt-utils
  • oh-my-zsh
  • terminator
  • sublime text
  • conda
#!/bin/bash
echo "****************************"
echo "**** setting up ubuntu *****"
echo -e "****************************\n"
SILENT_MODE="-q -y -o Dpkg::Use-Pty=0"
echo -e "-> installing zsh\n"
sudo apt-get $SILENT_MODE update
sudo apt-get $SILENT_MODE install --no-install-recommends ca-certificates
sudo apt-get $SILENT_MODE install --no-install-recommends zsh
sudo chsh -s /usr/bin/zsh
echo -e "-> installing ubuntu tools\n"
sudo apt-get $SILENT_MODE install --no-install-recommends \
apt-utils \
wget \
git \
zsh
sudo rm /var/lib/dpkg/lock-frontend
echo -e "-> installing oh-my-zsh\n"
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh || true
echo -e "-> setting zsh theme\n"
wget https://gist.githubusercontent.com/danielTobon43/9fdbaa726a2d239b735a18c8e67d706e/raw/e600ca9eae996c56716b12e53a7862dd03d399ce/robbyrussell.zsh-theme -O /home/$USERNAME/.oh-my-zsh/themes/robbyrussell.zsh-theme
echo -e "-> unseting paste highlight oh-my-zsh\n"
echo "unset zle_bracketed_paste" >> /home/$(whoami)/.zshrc
echo -e "-> installing terminator"
sudo apt-get $SILENT_MODE install --no-install-recommends terminator
echo -e "-> installing curl"
sudo apt-get $SILENT_MODE install --no-install-recommends curl
echo -e "-> installing sublime text\n"
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
sudo apt-get $SILENT_MODE install --no-install-recommends apt-transport-https
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
sudo apt-get update
sudo apt-get $SILENT_MODE install --no-install-recommends sublime-text
echo -e "-> installing conda\n"
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh
bash ~/miniconda.sh -b -p $HOME/miniconda
echo 'export PATH="$HOME/miniconda/bin:$PATH"' >> ~/.bashrc
echo 'export PATH="$HOME/miniconda/bin:$PATH"' >> ~/.zshrc
source ~/.bashrc
conda init
conda config --set auto_activate_base false
echo -e "-> runninh zsh as command line\n"
zsh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment