Hi, guys. How are you?
In this post I'll share the script I've been writing down during my most recent installation of Ubuntu 21.10, so I can reuse it on another computer.
It's divided into the following sections:
- Initial tasks
- Install essential software
- Tasks to do after install
- Development
- Browsers
- Other softwares
Note: This script is constantly changing. Follow the Ubuntu 21.10 Installation gist for the most current version, in case the text below is out of date.
Initial tasks
Use sudo
without password
# TODO: Check if entry already exists in sudoers file
# It'll ask for password only once
echo "${USER} ALL=(ALL:ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers
Update installed programs
sudo apt update
sudo apt upgrade -yV
sudo apt autoremove -yV
sudo apt autoclean
Make Ubuntu use local time for hardware clock
It avoids conflicts with Windows clock in dual-boot setups.
timedatectl set-local-rtc 1
Install essential software
sudo apt install -y \
apt-transport-https \
bash \
bat \
chrome-gnome-shell \
clang \
cmake \
curl \
dconf-editor \
dosfstools \
findutils \
gawk \
git \
gnome-shell-extension-prefs \
gnome-tweaks \
gpick \
grep \
grub-common \
grub-pc-bin \
htop \
jq \
libcurl4-openssl-dev \
libffi-dev \
libpython3-dev \
libreadline-dev \
libssl-dev \
libtool-bin \
libwim15 \
libwxbase3.0-0v5 \
libwxgtk3.0-gtk3-0v5 \
libxslt1-dev \
libxt-dev \
libyaml-dev \
make \
ntfs-3g \
p7zip \
p7zip-full \
parted \
python3-wxgtk4.0 \
qt5ct \
samba \
tmux \
ubuntu-restricted-extras \
unrar \
util-linux \
vim \
wget \
wimtools \
xclip \
zlib1g-dev \
zsh
Tasks to do after install
Make zsh
default shell to user and root
sudo chsh -s $(which zsh) ${USER}
sudo chsh -s $(which zsh) root
Add samba user
sudo smbpasswd -a ${USER}
Development
PHP
PHP 7.4
sudo add-apt-repository -y ppa:ondrej/php
sudo sed -i 's/impish/focal/' /etc/apt/sources.list.d/ondrej-ubuntu-php-impish.list
sudo apt update
sudo apt install -y php7.4-{cli,curl,fpm,mcrypt,xdebug,xml,zip}
Composer
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php composer-setup.php
php -r "unlink('composer-setup.php');"
sudo mv composer.phar /usr/local/bin/composer
PHP CodeSniffer (phpcs)
composer global require squizlabs/php_codesniffer=3.6.0
Python
Python 3
sudo apt install -y python-is-python3 python3-pip
Ruby
Ruby 2.7.1
sudo apt install -y rbenv ruby-build
echo 'eval "$(rbenv init -)"' >> ~/.zshrc
source ~/.zshrc
rbenv install 2.7.1
rbenv global 2.7.1
Gollum (Gitlab Wiki)
gem install gollum
IDE
Sublime Text
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
sudo apt update
sudo apt install -y sublime-text
VS Code
sudo apt install wget gpg
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
sudo install -o root -g root -m 644 packages.microsoft.gpg /etc/apt/trusted.gpg.d/
sudo sh -c 'echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/trusted.gpg.d/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list'
rm -f packages.microsoft.gpg
sudo apt update
sudo apt install -y code
DBMS
DBeaver
sudo add-apt-repository -y ppa:serge-rider/dbeaver-ce
sudo apt install -y dbeaver-ce
MySQL Workbench
sudo apt install -y mysql-workbench
DevOps tools
Docker
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
rm -f get-docker.sh
Docker Compose
I'm still using v1.29.2 because of incompatibilities with BuildKit in some projects I work.
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
Ansible
sudo apt install -y ansible
Terraform
sudo apt install -y terraform
Kool
curl -fsSL https://kool.dev/install | BIN_PATH=~/.local/bin/kool bash
Heroku
curl https://cli-assets.heroku.com/install-ubuntu.sh | sh
Minikube
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
sudo install minikube-linux-amd64 /usr/local/bin/minikube
RestAPIs
Postman
curl -Lo postman-linux-x64.tar.gz https://dl.pstmn.io/download/latest/linux64
tar zxvf postman-linux-x64.tar.gz
rm -f postman-linux-x64.tar.gz
sudo mv Postman /opt
sudo ln -sf /opt/Postman/Postman /usr/local/bin/postman
sudo ln -sf /opt/Postman/Postman /usr/bin/postman
Browsers
Brave
sudo curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg arch=amd64] https://brave-browser-apt-release.s3.brave.com/ stable main" | sudo tee /etc/apt/sources.list.d/brave.list
sudo apt update
sudo apt install -y brave-browser
Chrome
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt install -y ./google-chrome-stable_current_amd64.deb
rm -f google-chrome-stable_current_amd64.deb
Firefox
sudo snap remove firefox --purge
sudo apt install -y firefox
Microsoft Edge Dev
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo install -o root -g root -m 644 microsoft.gpg /usr/share/keyrings/
sudo sh -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/microsoft.gpg] https://packages.microsoft.com/repos/edge stable main" > /etc/apt/sources.list.d/microsoft-edge-dev.list'
sudo rm -f microsoft.gpg
sudo apt update
sudo apt install -y microsoft-edge-dev
Other softwares
Balena Etcher
curl -1sLf 'https://dl.cloudsmith.io/public/balena/etcher/setup.deb.sh' | sudo -E bash
sudo apt update
sudo apt install -y balena-etcher-electron
Clementine
sudo apt install -y clementine
Flatpak
sudo apt install -y \
gnome-software \
gnome-software-plugin-flatpak \
flatpak
Gparted
sudo apt install -y gparted
Grub Customizer
sudo apt install -y grub-customizer
Nemo
sudo apt install -y nemo
Numlockx
sudo apt install -y numlockx
Peek
sudo add-apt-repository -y ppa:peek-developers/stable
sudo apt install -y peek
qBitTorrent
sudo add-apt-repository -y ppa:qbittorrent-team/qbittorrent-stable
sudo apt install -y qbittorrent
Remmina
sudo apt-add-repository -y ppa:remmina-ppa-team/remmina-next
sudo apt install -y remmina remmina-plugin-rdp remmina-plugin-secret
SmartGit
# TODO: It is incomplete. Sorry :)
tar xzf <smartgit*.tar.gz>
bin/add-menuitem.sh
Spotify
curl -sS https://download.spotify.com/debian/pubkey_5E3C45D7B312C643.gpg | sudo apt-key add -
echo "deb http://repository.spotify.com stable non-free" | sudo tee /etc/apt/sources.list.d/spotify.list
sudo apt update && sudo apt install -y spotify-client
Steam
curl -0L https://cdn.cloudflare.steamstatic.com/client/installer/steam.deb -o ~/Downloads/steam.deb
sudo dpkg -i ~/Downloads/steam.deb
rm -f ~/Downloads/steam.deb
Terminator
sudo apt install -y terminator
TestDisk
sudo apt install -y testdisk
Tux Guitar
sudo apt install -y tuxguitar \
tuxguitar-jsa \
fluid-soundfont-gm \
fluid-soundfont-gs \
fluidsynth \
timidity
Typora
wget -qO - https://typora.io/linux/public-key.asc | sudo apt-key add -
sudo add-apt-repository -y 'deb https://typora.io/linux ./'
sudo apt install -y typora
WoeUSB
sudo add-apt-repository -y ppa:tomtomtom/woeusb
sudo apt install -y woeusb-frontend-wxgtk
Zoom
wget https://zoom.us/client/latest/zoom_amd64.deb -O zoom.deb
sudo apt install -y ./zoom.deb
rm -f zoom.deb
Top comments (0)