DEV Community

Cover image for Ubuntu Focal Fossa (20.04) essential starter script
Bojan Jagetic
Bojan Jagetic

Posted on

Ubuntu Focal Fossa (20.04) essential starter script

Introduction

After every new OS reinstallation you have to do the boring part and install everything from scratch. I have been in situation where I was installing
new Ubuntu environment multiple times per year, so I made myself easier and made a bash script which can do this for me.

What this bash script do

Basically this script is used for installing applications and services, which I normally use, most of the applications and services are for Developers but it can be opted out if you do not
want something to be installed. In the script there are blocks of installation commands divided by category, so first utilities and prerequired stuff will be installed.
For example if we have some project on github, which is needed to be downloaded like zsh and ohmyzsh, it is prerequired to install git first so if you want to change script have that in mind.

Applications and services available

As mentioned above, there are different categories so it is easier to organize, in this current version of the script there are 5 categories.
For the some less know application and services I added link so you can read first before installation and check if you want to use it, I personally think that are great stuff but you dont need to use it if you dont want.

Utility

  • curl

  • Git

  • Terminator

  • htop

  • unzip

  • zsh

  • OhMyZsh

  • GNome shell and tweaks

  • chrome-gnome-shell

  • chrome-gnome-tweaks

  • Albert

  • BigSure OSX theme*

  • Productivity & Social

  • Firefox

  • Taskade

  • Cacher

  • Telegram*

  • Discord*

  • Skype*

  • Microsoft Teams*

  • Slack*

  • Rocket Chat*

  • Konversation*

  • Flock Chat*

  • Development

  • NodeJS

  • npm

  • MongoDB*

  • Robo3T (Robo Mongo)*

  • Redis*

  • Redis Desktop Manager*

  • Docker*

  • Visual Studio Code

  • Postman

  • TypeScript

  • npx

  • Sublime Text

  • Beekeper Studio

  • Entertainment

  • Spotify

  • Orange-app - SoundCloud Client

  • Musixmatch

  • All applications and services with * are optional and can be skipped

    Script breakdown

    As already mentioned, script is sorted by the category and dependency. We can split installation to three types:

  • Straight-forward installation

  • Optional installation

  • Multi select installation

  • Straight-forward installation

    Installation of applications and services are pretty straight-forward, most of the installations are from snap, some are from apt and the rest is from original build source.
    It looks something like this:

    sudo snap install curl
    sudo apt-get install git -y
    
    Enter fullscreen mode Exit fullscreen mode

    Optional installation

    In this type use is opted with the prompt to choose wheather to install or not specific application using classic linux options y/N

    echo "Do you want to install MongoDB? [Y,n]"
    read mongoInput
    if [[ $mongoInput == "Y" || $mongoInput == "y" ]]; then
            echo "MongoDB will be installed with Mongo3T ..."
            # Install MongoDB
            echo "${RED}Starting MongoDB installation${NC}"
            wget -qO - https://www.mongodb.org/static/pgp/server-4.2.asc | sudo apt-key add -
            echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.2.list
            sudo apt-get update
            sudo apt-get install -y mongodb-org
            sudo snap install robo3t-snap
    else
            echo "Skipping MongoDB installation..."
    fi
    
    Enter fullscreen mode Exit fullscreen mode

    Multi-select installation

    Multi-select installation present installation of multi or none applications from the list of proposed applications. This is used for communication and social apps due to everybody is using different app for every day communication or more ofter combination of many social apps so there is option to choose which you want to install.

    names=(telegram-desktop discord skype teams slack rocketchat-desktop konversation flock-chat)
    selected=()
    PS3='Choose which communication application you want (e.g. 1 2 to install telegram and discord)? : '
    select name in "${names[@]}" ; do
        for reply in $REPLY ; do
            selected+=(${names[reply - 1]})
        done
        [[ $selected ]] && break
    done
    echo Selected: "${selected[@]}"
    
    for t in ${selected[@]}
    do
       echo "Installing $t"
       sudo snap install $t
    done
    
    Enter fullscreen mode Exit fullscreen mode

    You can check it out on github https://github.com/basskibo/ubuntu_starter_installer or in the original post on my personal website https://www.bojanjagetic.com/libary/ubuntu-essentials

    Top comments (0)