Linux workstation setup script

Last updated: 21 February 2019

The following is my personalised Linux workstation setup script that I run after a fresh installation of Linux Mint 19.1:

#!/bin/bash

####################
# As user | Output #
####################

printf "\nWorkstation setup started.\n"

#######################
# As user | GSettings #
#######################

gsettings set org.nemo.preferences show-hidden-files true

############################
# As user | Switch to Root #
############################

if [ $EUID != 0 ]; then
	sudo su --login
fi

if [ $? != 0 ]; then
	exit
fi

#########################################
# As Root | Software | Upgrade packages #
#########################################

apt update

apt upgrade

################################################
# As Root | Software | Install from repository #
################################################

apt install chromium-browser
apt install g++ g++-multilib gcc gcc-multilib gdb
apt install glade
apt install mono-complete
apt install msttcorefonts

###########################################
# As Root | Software | Visual Studio Code #
###########################################

curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg

install -o root -g root -m 644 microsoft.gpg /etc/apt/trusted.gpg.d/

sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'

apt install apt-transport-https

apt update

apt install code

#######################
# As Root | GSettings #
#######################

gsettings set org.nemo.preferences show-hidden-files true

####################
# As Root | Output #
####################

printf "\nWorkstation setup completed.\n"