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.
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
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
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)"
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
Then, you can edit your .zshrc
to change to the agnoster theme:
vim ~/.zshrc
# 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"
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).
While you're at it, you can also adjust background (I like to set up transparency to 85%).
This is the final result:
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"
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
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
You can now install a desktop entry to PhpStorm by going to Tools
-> Create Desktop Entry
.
Now the fun starts, with theme choosing etc.
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.
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
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
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
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
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 (:
Top comments (18)
For video and audio processing and recording, you can also try ffmpeg. It's simply... marvelous.
Yes! I got it installed in the first
apt
command :DSorry missed it, probably because I focused on the multimedia section and expected to see it there. ;)
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 😸
Can someone really tell me,
Why Linux??
If it's that important, can you hook up some link for me to refer??
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.
Permissioning and directory traversing just seems easier too.
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
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 👍
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.
Without fences & walls, you don't need Windows & Gates
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.
Loved it! I've used tmux and now I have to try terminator. I'm a huge fan of easier.
That's a neat set-up. I would like to suggest four additional programs that may come in handy ―
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/
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.
Did not know about terminator before. Thanks for sharing!
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?
According to the official website, Ubuntu 21.04 End of Life is January 2022
Source: wiki.ubuntu.com/Releases