DEV Community

Cover image for Setting Up a Fresh Ubuntu 21.04 Desktop as Personal Computer
Erika Heidi
Erika Heidi

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

Setting Up a Fresh Ubuntu 21.04 Desktop as Personal Computer

I recently got a brand new personal laptop (hooray bonus!) and got a suggestion for a blog post about setting up my Ubuntu for personal use. It's been a while since I shared these types of posts, so I thought it would be fun to write about my new setup.

I've been an Ubuntu user for a long time, it is a system where I feel very comfortable so that means it also makes me more productive. I decided to try the newest release, the brand new 21.04 a.k.a Hirsute Hippo. In this post, I share all my setup process.

Hirsute Hippo

Getting Started

Well, the first step is to get the system all installed and set up.

As I mentioned previously, I chose the newest 21.04 release of Ubuntu, also known as Hirsute Hippo. You might want to go with the LTS (20.04) version if you don't plan on upgrading / reinstalling your system before 22.04 is out (the next LTS). The advantage of the 21.04 version is because it's already one year newer than the LTS, so the software that it comes with and the default apt packages for the distro are already bleeding edge, so you can install most things via apt without worrying that it's all outdated.

Installation Remarks

Because this is a new laptop, I didn't need to do any backup, but if you are going to do this on your existing system please don't forget about it :)

I always choose full disk encryption when installing Ubuntu, this is an option that will show up when choosing installation type and partitions. This adds extra security to your system, just be sure you keep your decryption key safe otherwise you will lose access to your entire system!

Priority Installs

Depending on which Ubuntu version you're installing, you may need to update the system right after installation to make sure you have the most updated version of the software you're going to use. You will get a notification from Ubuntu if updates are available for your system as soon as you log in.

Now it's time open the terminal to install a few basic packages right away:

sudo apt update
sudo apt install vim git unzip curl ffmpeg
Enter fullscreen mode Exit fullscreen mode

Then, onto more interesting things.

Terminator and Oh-My-Zsh

Next, I like to set up my terminal and shell. I've been using Terminator for years, I really like to be able to split the screen in multiple ways and Terminator is a lot easier to use than tmux for me. I'm also a big fan of oh-my-zsh and have been using it for many years.

So the first thing is to install zsh and terminator.

sudo apt install zsh terminator
Enter fullscreen mode Exit fullscreen mode

Then, you can run the Oh-my-Zsh installation script, which will also set zsh as your default shell:

$ sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
Enter fullscreen mode Exit fullscreen mode

The theme I like is called agnoster, and to use that theme you'll need to install Powerline fonts. To install these, you'll need to clone their repo and run the install script:

cd /tmp
git clone https://github.com/powerline/fonts.git
cd fonts/
./install.sh
Enter fullscreen mode Exit fullscreen mode

Then, you can edit your .zshrc to change to the agnoster theme:

vim ~/.zshrc
Enter fullscreen mode Exit fullscreen mode
# 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

Don't forget to save the file (with vim, type ESC then :wq to save).

You can now close the old terminal and open terminator! You'll need to change the font to one of the Powerline patched fonts you just installed, otherwise the prompt won't show up correctly.

To customize your Terminator appearance, right-click and go to Preferences -> Profiles and unmark the checkbox that says Use the system fixed width font. Then choose the font (tip: search for "powerline" to show only the powerline-compatible fonts).

Screenshot of Terminator settings

While you're at it, you can also adjust background (I like to set up transparency to 85%).

This is the final result:

Terminator + Oh-my-zsh agnoster theme

SSH Setup

It is a good idea to set up a new SSH key if you are setting up a fresh new system. This GitHub Doc Page contains detailed instructions on how to set a new SSH key with the Ed25519 algorithm and add it to the SSH-agent.

If you are using GitHub, it's also a good moment to add the new key to your account (go to Settings -> SSH and GPG Keys).

Git Setup

To use Git from the command line, you'll need to configure your Git name and email address in order to do commits and pushes.

git config --global user.name "Your Name"
git config --global user.email "email@example.com"
Enter fullscreen mode Exit fullscreen mode

Development Setup

Nowadays I typically have only a basic php-cli installed on my system, and I use Docker + Docker Compose to run my full development environments. This tutorial from my friend Brian explains in detail how to get Docker installed on Ubuntu 20.04.

With Docker installed you can follow my tutorial on How to Install Docker Compose to get Docker Compose also set up.

If you'd like a basic PHP env for the command-line as well, you can install php-cli and a few basic extensions from your terminal:

sudo apt install php-cli php-mbstring php-gd php-curl
Enter fullscreen mode Exit fullscreen mode

Setting Up Jetbrains PhpStorm (IDE)

I've been using Jetbrains PhpStorm for many years, it is my favorite IDE (all from Jetbrains actually, since I've used RubyMine in the past too). Downloads are available in AppImage format, which is really helpful.

You can download PhpStorm as a trial too, if you'd like to try it out before buying a license. Once you've downloaded the package, just unpack it to somewhere in your home dir and run it with:

./PhpStorm-211.7142.44/bin/phpstorm.sh
Enter fullscreen mode Exit fullscreen mode

You can now install a desktop entry to PhpStorm by going to Tools -> Create Desktop Entry.

Now the fun starts, with theme choosing etc.
Installing plugins on PHPStorm

The editor font size is always too small for me, so I like to adjust it to a bigger size. I've been using JetBrains mono size 20, and I also like to enable ligatures, I think it gives a nice look to some portions of code.

Adjusting font size

Other Software Installs

Because this is a personal laptop and I am a person of many hobbies, I will have a great mix of software here including video editing, graphics design, 3D design, and development (IDEs) software.

Nowadays, most desktop applications for Ubuntu/Debian are being distributed as AppImage files, which are quite easy to work with. I usually create an Apps folder in my home dir to save these applications.

mkdir ~/Apps
Enter fullscreen mode Exit fullscreen mode

Some of them still use more traditional distribution methods, like Gimp which can be installed via apt.

So here is a list of other applications that I got installed right away, organized by category:

Graphic Design

  • Inkscape - Vector Graphics. Available as AppImage.
  • MyPaint - Drawing and Painting. Available as AppImage.
  • Gimp - Graphic Design, photo manipulation. Installed via apt.

Video and Streaming

  • Peek - Simple screen recording, records in gif or mp4. Installed via apt.
  • OBS Studio - Screen recording and streaming. Installed via apt
  • OpenShot - Video Edition. Available as AppImage.

Audio

  • Audacity - Audio recording. Installed via apt.
  • Spotify - On-demand music, installed via snap.
  • LMMS - Music making (loops / midi etc). Available as AppImage.

3D Design & Printing

  • FreeCAD - 3D Design. Available as AppImage.
  • OpenScad - Programatic 3D Design. Installed via apt.
  • Blender - 3D Design and modeling. Available as tar file that you just need to unpack to your home folder.
  • Prusa Slicer - 3D Printing Software for Slicing Models. Available as AppImage.

You can download all the AppImages and then do the following:

mv ~/Downloads/*.AppImage ~/Apps
chmod +x ~/Apps/*.AppImage
Enter fullscreen mode Exit fullscreen mode

UPDATE: Disabling Wayland on Ubuntu 21.04

updated on May 7

Yesterday I was just about to record some screencasts with OBS when I noticed there was something strange going on. The screen capture was coming all black, only the cursor would show up; not only that, but also the window capture was not working at all, not even listing the currently open windows.

I also tried Peek, another screen recording application, to the same results.

I've been tracking down the problem since yesterday and finally found the reason and the solution. Wayland, a new display server protocol, is now enabled by default to replace X11 on Ubuntu 21.04. I didn't know anything about this, but after some Googling I found out other people having similar issues with OBS on Ubuntu and finally I was able to fix it!

To disable Wayland on Ubuntu 21.04, go to your terminal and open the file /etc/gdm3/custom.conf using your command-line editor of choice:

sudo vim /etc/gdm3/custom.conf
Enter fullscreen mode Exit fullscreen mode

Look for the line saying #WaylandEnable=false and uncomment it by removing the # character from the beginning of the line. Save and close the file - with vim, you can do that by typing ESC then wq and ENTER.

Then you just need to restart your window manager with:

sudo service gdm3 restart
Enter fullscreen mode Exit fullscreen mode

You should now be all set!

Conclusion

Setting up a new system is a neverending task, but I am pretty happy now with the current state of my new laptop :) Can't wait to try out some of this software with this machine, since it's a big upgrade from my previous one.

Anything important I missed? Tell me in the comments (:

Current State

Top comments (18)

Collapse
 
msk61 profile image
Mohammed El-Afifi

For video and audio processing and recording, you can also try ffmpeg. It's simply... marvelous.

Collapse
 
erikaheidi profile image
Erika Heidi

Yes! I got it installed in the first apt command :D

Collapse
 
msk61 profile image
Mohammed El-Afifi

Sorry missed it, probably because I focused on the multimedia section and expected to see it there. ;)

Collapse
 
hasindulanka profile image
Hasindu Lanka

I like exploring new versions (even beta) frequently. So I made this repo where I can run ./install and wait until it install and configure everything I want.

github.com/HasinduLanka/FreshLinux
Just like what you did here 😸

Collapse
 
geobrodas profile image
Georgey

Can someone really tell me,
Why Linux??
If it's that important, can you hook up some link for me to refer??

Collapse
 
ryanatk profile image
ryan atkinson

It's open source, relatively easy to use and customize, and there are more opportunities to learn thru exploration. If you just want to use Microsoft & Apple consumer-focused software, then Linux is maybe not for you. But if you like to break & fix things to learn how they work, Ubuntu is the best! Also you can typically get away with a much slower (cheaper) computer that might not be able to run Windows.

Collapse
 
vince_bighire_tools profile image
Vince Fulco (It / It's)

Permissioning and directory traversing just seems easier too.

Collapse
 
klvenky profile image
Venkatesh KL • Edited

If someone had asked me this question 2 years ago I would have given a straight forward answer startup time. It's back in those days when my 16gb, i5 processor powered laptop(with a brand new SSD) used to take atleast 3-5 minutes to boot up & be usable. I mean, the startup was slow & is there was a TTI(Time To Interactive) for OSes windows would go at last.

However my perspective has changed recently. I use Ubuntu as my daily driver as it's what we use at work. Recently I've noticed that startup time & reboot time of windows have come down significantly. So now my points to use any linux system for development would be as below

  1. Being able to install docker & nvm comfortably. I use them in a daily basis so, it's better if it's easy to install & use.
  2. Being as close to your production environment, Unless you're hosting your applications on windows servers.
  3. Being able to work on even a decently powered machine(Average processor + 4-8 gb of memory + hard disk drive).
  4. Finance budgets. I know this doesn't apply to big oraganizations as they purchase licences in bulk, but startups which are not having great baking may consider running with minimal finances. So the developer machine bay not be brand new MacBook at all.
  5. Personal comfort. I've been using Ubuntu for almost 5+ years in a row. So I'm more comfortable there so that's an obvious choice.

If at least 3/5 comes as a Yes, then go for a Linux machine.
Point 4 is very prominent though of others. If you have budget you'd obviously go for a MacBook, so you may not even reach this place. So chill out.

Cheers 👍

Collapse
 
unfor19 profile image
Meir Gabay • Edited

WSL2 is quite a game-changer. I used Ubuntu about a year ago, and then I found WSL2, from that moment, I ditched Ubuntu and now I'm using Windows with WSL2.

If you're not developing anything, then Ubuntu (or "Linux") is probably something that you don't essentially need. But for developers ... Working on a UNIX system is quite basic and a must, that's why macOS is also great for development.

Collapse
 
ryanatk profile image
ryan atkinson

Without fences & walls, you don't need Windows & Gates

Collapse
 
ndom91 profile image
Nico Domino

Why Linux? Its simple - it makes computing fun again, the fact that you and only you own what you do on your computer is a great side-effect, but not the main attraction imo.

Collapse
 
mrxinu profile image
Steve Klassen (They/Them)

Loved it! I've used tmux and now I have to try terminator. I'm a huge fan of easier.

Collapse
 
fhsinchy profile image
Farhan Hasin Chowdhury

That's a neat set-up. I would like to suggest four additional programs that may come in handy ―

  • tlp for laptop battery life optimization.
  • cpufreq for system monitoring and power management.
  • howdy for Windoes Hello style facial recognition.
  • libinput-gesture if you want multi finger action gesture with your touchpad.
Collapse
 
rolandw profile image
Roland Whitehead

You didn't mention dual booting. I have a number of Linux based machines which started as Windows based machines because you can't easily buy them without. I'm typing this on a "Ubuntu supporting" Dell laptop. Even so, the tech guys at Dell (at least this side of the Noordzee) don't quite get it and always want you to boot into Windows if you are reporting an issue. The on-site engineers don't care - in fact they usually get excited to see Linux running on a machine that they've just fixed and want to learn from you. So when you first install Ubuntu, always agree to the dual boot option - it doesn't need to be a big partition. I will then use KVM or VirtualBox (depending on the generation of machine) to run Windows on demand in a VM because, unless it's a dire issue, I reboot for no-one...

PS. Check out Tilix - gnunn1.github.io/tilix-web/

Collapse
 
mccurcio profile image
Matt Curcio

Love Ubuntu based systems!
I have always wanted a comprehensive script that would take care of my favorites (long list) and EVEN do config files. Someday... ahhh.

Collapse
 
kishanbsh profile image
Kishan B

Did not know about terminator before. Thanks for sharing!

Collapse
 
kishanbsh profile image
Kishan B

In mac os i use home brew for all applicaiton installation (cli apps and gui apps).

In ubuntu i see apt and snap. Which one would you choose and when?

Collapse
 
shaerif profile image
Sharif

According to the official website, Ubuntu 21.04 End of Life is January 2022
Source: wiki.ubuntu.com/Releases