DEV Community

Cover image for Setting Up an Ubuntu 22.04 Workstation for Software Development and Content Creation
Erika Heidi
Erika Heidi

Posted on • Edited on • Originally published at onlinux.systems

Setting Up an Ubuntu 22.04 Workstation for Software Development and Content Creation

Ubuntu 22.04 a.k.a. Jammy Jellyfish is the latest LTS (long-term support) Ubuntu release, which means it will continue being actively updated and supported until the next LTS release in two years.

This release brings some exciting improvements, such as the new screenshot tool and custom theme accents. Upgrading is also important to make sure you are getting the most up-to-date packages and applications for your system.

In this step-by-step practical guide I will share how I set up my Ubuntu 22.04 workstation for software development and content creation.

If you need help installing Ubuntu 22.04 on your machine, check out this step by step guide on how to make a fresh Ubuntu install with full disk encryption.

Basic Setup

First things first. Start by updating the package manager cache and making sure a few basic packages are installed:



sudo apt update
sudo apt install curl unzip git ffmpeg


Enter fullscreen mode Exit fullscreen mode

To keep things organized, I like to create a directory in my home folder to store AppImage applications. We'll download some of them later.



mkdir ~/Apps


Enter fullscreen mode Exit fullscreen mode

Make sure you have your SSH keys set up. If you don't have backup keys to restore, follow this GitHub guide on how to create and set up a new SSH key.

If you're restoring existing SSH keys, you can follow the next section.

Restoring SSH keys (if your keys are backed up)

If you haven't done it yet, copy the SSH keypair you have registered with your code host of choice to a .ssh folder in your home directory. If you have your keys in a removable storage, you should make sure to copy them over and set correct permissions, otherwise they won't work and you won't be able to push code to GitHub / GitLab / etc.

The following command is an example of how to copy a .ssh folder from a removable media device into your home dir:



cp -R /media/user/HD-PCTU3/backups/.ssh .


Enter fullscreen mode Exit fullscreen mode

Then, change the permissions of the SSH directory and key files:



chmod 700 ~/.ssh
chmod 644 ~/.ssh/id_ed25519.pub
chmod 600 ~/.ssh/id_ed25519


Enter fullscreen mode Exit fullscreen mode

Finally, add the key to the SSH agent:



eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519


Enter fullscreen mode Exit fullscreen mode

Power up your CLI: Terminator + Oh My ZSH

To keep going with your setup on a much nicer terminal, you will now install Terminator and Oh My Zsh. Terminator is a terminal emulator that allows you to arrange multiple terminals in a grid-like structure. Oh My Zsh is a layer of configurations on top of zsh that makes your terminal look super cool, with several themes and plugins to improve your productivity.

Start by installing Terminator and Zsh:



sudo apt install terminator zsh


Enter fullscreen mode Exit fullscreen mode

Next, install Oh my Zsh:



sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"


Enter fullscreen mode Exit fullscreen mode

When prompted, confirm that you want to set Zsh as your default shell. This will require you to provide your sudo password.

In order to use some of the best themes, you'll need to first install Powerline fonts on your system. I prefer to run the install script directly from their official repository like so:



git clone https://github.com/powerline/fonts.git --depth=1
cd fonts
./install.sh
cd ..
rm -rf fonts


Enter fullscreen mode Exit fullscreen mode

Next, it's time to configure Oh my Zsh. Open .zshrc and look for the ZSH_THEME variable:



nano ~/.zshrc


Enter fullscreen mode Exit fullscreen mode

There are several themes, but my favorite is agnoster:



# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
ZSH_THEME="agnoster"



Enter fullscreen mode Exit fullscreen mode

After changing ZSH_THEME to your theme of choice, save the file and exit.

With nano, you can save and exit by typing CTRL+X than confirming with y and ENTER.

Setting Up Terminator

Next, we'll set up Terminator. This is how it should look now when you open it (type Windows then search for terminator to find it in your system):

Terminator before configuration

You'll notice that the prompt is already changed to use Oh My Zsh, but it is broken. This is because we still need to configure the terminal program (in this case, Terminator) to use a proper Powerline font, a requirement for using the agnoster theme. This brings icons and other niceties to the terminal.

Right-click and access the menu Preferences, then go to the Profiles tab and select the default profile on the left sidebar. Uncheck the option Use system fixed font. To disable that annoying red top title bar, uncheck "Show titlebar".

Change the font to any of the Powerline fonts (you can search for "mono powerline" to facilitate choosing your favorite). I chose Noto mono for powerline bold, size 16.

Still on the Terminator profile preferences, I set the background to "Transparent background" at 80% and the Color scheme to "Solarized". Here's the final result:

Finished terminal configuration - Terminator + Zsh + Oh my Zsh with Powerline fonts

Git

Git should already be installed on your system. To confirm, type git --version on your terminal, and you should see something like this:



git version 2.34.1


Enter fullscreen mode Exit fullscreen mode

If for some reason you don't have Git installed, you can do so with the following command:



sudo apt install git


Enter fullscreen mode Exit fullscreen mode

Git Config

With everything set, you should now configure your username and email within Git:



git config --global user.name "Your Name"
git config --global user.email your@email.com


Enter fullscreen mode Exit fullscreen mode

Software Development

Development environments and other configurations related to software development.

PHP (CLI only) + Composer

I typically have PHP-cli on my systems because it's just a lot easier to run small scripts directly with it. Anything that requires extra dependencies runs on Docker. I also find it useful to have Composer to facilitate bootstrapping new projects with composer create-project. Usually after the initial project bootstrap I migrate to using Docker.

To install PHP-cli (8.1+), run:



sudo apt install php-cli


Enter fullscreen mode Exit fullscreen mode

For Composer, you should follow the official instructions since the hash checking portion of the installation script will change often.

Docker + Docker Compose

Next, install the Docker Engine and Docker Compose. The following commands are based on the official instructions from the Docker documentation.

Download Docker's deb repository key:



curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg


Enter fullscreen mode Exit fullscreen mode

Add Docker's deb repository:



 echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
  $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null


Enter fullscreen mode Exit fullscreen mode

Install Docker and Docker Compose:



sudo apt update

sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin


Enter fullscreen mode Exit fullscreen mode

You can check that it was successfully installed with:



docker --version
Docker version 20.10.16, build aa7e414


Enter fullscreen mode Exit fullscreen mode

Don't forget to add your user to the docker group so that you can run Docker without sudo.



sudo usermod -aG docker $USER


Enter fullscreen mode Exit fullscreen mode

You may need to log out and log in again for this change to take effect.

IDEs

Next, it's time to install your IDE of choice. This is more personal and depends a lot on which programming language you work with, what you are studying, etc.

Generally speaking, VSCode is an excellent choice for all languages, but if you are willing to invest in a paid IDE you will be very happy with any flavor of JetBrains.

Installing VSCode

VSCode offers a .deb file for Ubuntu/Debian users and that is my preferred way to install it. Once you download the file from the VSCode downloads page, you can install it with:



sudo dpkg -i ~/Downloads/code_1.67.1-1651841865_amd64.deb


Enter fullscreen mode Exit fullscreen mode

Replace the name of the file with the version you downloaded. After installation, you can type window and search for "vscode" to find it in your system.

VSCode with Material Theme (Pale Night)
VSCode with Material Theme

Installing PHPStorm

PHPStorm, as well as other editors from JetBrains, is offered as a .tar.gz package ready to use and also as a snap. I do not use Snap, so I just download the targz and unpack it to my home directory.

Once you download the appropriate package from the PHPStorm download page, you should unpack it somewhere in your home folder (I'm using ~/Apps for AppImages and other software like this).



mv PhpStorm-2022.1.1.tar.gz ~/Apps
cd ~/Apps
tar -zxvf PhpStorm-2022.1.1.tar.gz
rm -rfv PhpStorm-2022.1.1.tar.gz


Enter fullscreen mode Exit fullscreen mode

Then, run the executable script on bin/phpstorm.sh:



cd PhpStorm-221.5591.58/
./bin/phpstorm.sh


Enter fullscreen mode Exit fullscreen mode

You'll be greeted by a configuration wizard, and you will be asked to choose between activating an existing account or starting a 30-day trial.

Once you get to the main window, go to Tools -> Create command line launcher to create a PHPStorm executable on /usr/bin/phpstorm. This executable allows you to open files on PHPStorm directly from your CLI, and also to access PHPStorm from shortcuts on Ubuntu.

PHPStorm with Material Theme (Synth Wave '84)
PHPStorm with Material Theme

Software for Content Creation on Linux

I big part of my work is to create content, using different media and content types. I will list here the software I like to have installed for dealing with image editing, illustration, video editing, audio editing, video and audio capture, live streaming...

I won't cover these in detail, but the installation method won't vary from the 3 methods we've already seen in this guide (apt, downloaded .deb with dpkg, or downloaded AppImage).

  • Live streaming and video recording
  • Simple video/audio conversion in the command line
  • Video Editing
  • Vectorized illustration, logos
  • "Free style" illustration
  • Audio recording and editing

Additional Resources

Other Ubuntu tutorials that might interest you:

Top comments (3)

Collapse
 
evaldobento profile image
Evaldo Bento

I used to have Terminator + Guake to also have a terminal always at hand with F12. It was not so nice because I had to keep two setup for themes for both apps.

Then I found Tilix. This one also has a "Quake mode", so it is easier to setup and it integrates beautifully with Gnome.

Collapse
 
raibtoffoletto profile image
Raí B. Toffoletto

Nice setup!! But I personally go for PopOs nowadays, cosmic desktop is becoming great for dev's workflow.

Collapse
 
paulknulst profile image
Paul Knulst

This is a very nice setup. Next time I install an Linux based distribution I will follow this guide.

Thank you.