A gentle guide on setting up ElementaryOS (Linux distribution)

And you can still keep using Windows at the same time.

Kien Doan
Analytics Vidhya
7 min readApr 14, 2020

--

Forewords: I have been a Windows user for all my life. I still used Windows 10 for my Python work in data science, until I found out that Linux-based systems have more significant benefits. Firstly, I frequently have problems with PATH in Windows when working with Python, either in VS Code or Pycharm. Windows seems to be unstable and buggy in this respect. Secondly, most of server computers use Linux systems, so getting started with Linux will be beneficial for you in the long term.

For these reasons, I highly recommend you to give Linux-based systems a try. There are many Linux distributions (distros), and Ubuntu 18.04 Long-term support (LTS) is currently the most popular among others. You can also try Linux Mint, Xubuntu for a weak computer. You can see a full list of completely free available Linux distributions by hitting Google. However, my personal choice is Elementary OS.

I — Installing ElementaryOS

Here is a quick overview of the Elementary OS: https://elementary.io/ The main reason I choose Elementary OS is because it is very similar to Ubuntu (the installation and command lines are absolutely the same), yet it gives a unique elegant MacOS-like feel for an open-sourced operating system. In my opinion, ElementaryOS is the most beautiful and possibly most stable Linux distribution among others. In the sea of many Linux distros, ElementaryOS has made a lot of improvements recently and I believe it won’t make you disappointed. In fact, I have been working in ElementaryOS for a few months now. It is not only bug-free, but also significantly boosts my creativity and productivity :)

My Elementary OS interface

To install Elementary OS, just follow this tutorial: https://itsfoss.com/guide-install-elementary-os-luna/ This will explain everything you need to install your Elementary OS. However, you can find the latest Elementary OS package from its homepage. At this time of writing, it is Elementary OS 5.1.3 Hera.

Since I have had a lot of problems installing dual-boot Linux and Windows systems, I am just gonna give you 2 important notes:

  • Firstly, make sure you read and follow the tutorial carefully, especially at the steps of choosing partitions, creating volume and swap area. I wish I had followed this tutorial before wasting tons of time reinstalling and fixing the systems over again.
  • Secondly, if you want to have dual-boot Linux and Windows systems: first install Windows 10, then install Elementary OS. Because from my experience, if you install Elementary OS first then Windows 10, the Windows 10 setup will damage Elementary OS’ boot files, making it unable to load. I had to fix this problem by reinstalling Elementary OS afterwards.

II — Brushing up Elementary installation

Typical problems encountered by many ElementaryOS and Ubuntu users after installation include the run-time error message screen at shutdown and long shutdown time (up to 2 minutes). This makes me feel very insecure as if the system is so fragile and full of bugs. However, these can be fixed easily as following.

1. Fixing ‘PCI Error severity’ shutdown screen

  • Step 1: make a backup of your grub config file. Open a terminal and use the following command:
  • Step 2: open the grub file to edit:

Step 3: Edit this line as following:

  • Step 4: Save the file by Ctrl+O → Enter, then exit by Ctrl+X.
  • Step 5: Update grub and reboot the system

2. Fixing Ubuntu’s slow shutdown

  • Step 1: open the system.conf file
  • Step 2: Uncomment and set these lines as following:
  • Step 3: Save the file by Ctrl+O →Enter, then exit by Ctrl+X.
  • Step 4: Reboot.

Now you can expect to have your ElementaryOS running smoothly.

Reference:

https://itsfoss.com/pcie-bus-error-severity-corrected/
https://medium.com/@sbyang/slow-shut-down-of-ubuntu-18-04-e5fcc31255e2

III — Customizing ElementaryOS

1. Customizing keyboard shortcuts

To customize keyboard shortcuts, choose System settings > Keyboard > Shortcuts.

Here you can edit the keyboard shortcuts for almost everything in ElementaryOS, such as tiling apps in a window, switching workspaces, setting shortcuts for Applications (opening Terminal, web browser, home folder and so on).

There are many things you can do to customize ElementaryOS, you can find out by searching specific things on Google. Here I will only show you one thing not many people know.

Install AppEditor in AppCenter.

This app will let you know the command lines of app entries, which you can use to add customized keyboard shortcuts which you cannot find elsewhere. For example I can create a new keyboard shortcut for opening System Settings as following. First copy the command line for this app in AppEditor, then add it in the Shortcuts tab of Keyboard settings and bind with a key combination such as Alt+A. Now I can open System Settings by hitting Alt+A:

Another important keyboard shortcut is for shutting down. Copy the following command line to the Custom section in Shorcuts tab of System Settings > Keyboard:

then combine with Alt+F3. Now I can turn off the computer by hitting Alt+F3. Of course you can use any key combination of your choice, as this is only my preference.

2. Customizing boot menu

Install Grub customizer by following this tutorial: https://itsfoss.com/grub-customizer-ubuntu/

IV— Git

1. Install git

2. Essential git commands

  • Step 1: create a new repository (repo) on github and copy its link.
  • Step 2: open your local project directory in your Terminal and type the following commands by this order:

For more git guide and commands:
What is Git?
GitHub credential settings
https://rogerdudler.github.io/git-guide/

V— Setting up Python IDE

Anaconda

You should probably know that to start working with Python, one of the most stable distributions to install is Anaconda. This tutorial also works seamlessly for ElementaryOS. Just look for the latest Anaconda package.

https://www.digitalocean.com/community/tutorials/how-to-install-anaconda-on-ubuntu-18-04-quickstart

Atom

Atom is regarded as the one of the most stable, powerful and customizable text editors in Linux. It is also my #1 choice.

How to install Atom: https://flight-manual.atom.io/getting-started/sections/installing-atom/

Kite

Kite has a lot of support for coding. My favorite feature is Kite copilot, which shows details of every function and object, making my coding a lot easier and more enjoyable.

Install Kite
Using Kite plugin in Atom

VI — Setting up R programming IDE

1. Install the latest version of R:

R-base installations by default command lines are often outdated. Here is the instruction for installing the latest version of R from the CRAN project website: https://cran.r-project.org Especially, you need to adjust the entry in/etc/apt/sources.list to force it install the latest version (at the time of writing, it is R version 4.0.0)

2. Install the ‘tidyverse’ package in R Studio:

Initially, RStudio failed multiple times as it attempted to install ‘tidyverse’. This is because my Linux system lacks several prerequisite non-R packages. I took me quite a long time to search for a solution and luckily this guy did a wonderful job: https://blog.zenggyu.com/en/post/2018-01-29/installing-r-r-packages-e-g-tidyverse-and-rstudio-on-ubuntu-linux/ . I hope this will help if you encounter the same problem as I did.

VI —Linux command lines for installing and uninstalling packages

To install a package:

To remove a package:

That’s it today for my ElementaryOS tutorial. I would be very happy if this can help or give you a new idea in your coding journey. Feel free to leave a comment if you have other issues installing ElementaryOS and I will try my best to help you.

Have a nice day :)

--

--

Kien Doan
Analytics Vidhya

Data analyst. Coding enthusiast. Lover of knowledge. A blog dedicated to self-studying data science, business analytics and meta-learning.