Setting Up Solus for Software Development

Page content

How to set up an installation of the Solus Linux distribution on your PC for systems administration and Web development.


Enable Disk Encryption

Enable LVM and disk encryption when prompted during the setup process.

Disk encryption is the only protection against anyone with physical access to your computer. All other security measures will be completely bypassed if someone with physical access either restarts your computer with a bootable pen drive, or removes the internal hard drive and attaches it to another computer.

Set a Password for UEFI or BIOS

Once you have installed Solus, restart your computer, and press the function key to enter the setup menu for the UEFI firmware, or BIOS. Change the boot options so that the computer only boots from the hard drive, and set both a user password for startup, and an administrator password to protect the firmware menus.

Do This First!

Log in once, run the Software Center utility, and ensure that the operating system has the latest updates. After all of the updates have been applied, restart the computer.

User Settings

Select Settings > Privacy, and review the settings. Depending upon your needs, you may decide to turn off Location Services or Usage & History.

Setting Up for Development

Every developer needs a text editor and a version control system.

Git Version Control

To install the Git version control system on Solus, run this command in a terminal window:

sudo eopkg install git

Always set your details before you create or clone repositories on a new system. This requires two commands in a terminal window:

git config --global "Your Name"
git config --global ""

The global option means that the setting will apply to every repository that you work with in the current user account.

To enable colors in the output, which can be very helpful, enter this command:

git config --global color.ui auto

Text Editors

Solus includes a command-line version of nano, as well as a desktop text editor. These text editors have some support for programming, but are more useful for light-weight word processing. The package repositories include other editors and IDEs.

You will massively improve your experience with your text editor by adding a useful set of extensions to it. The exact extensions that will benefit the most you depend upon the work that you do, but you should always look at version control integration, convenient access to the terminal, and linters for your preferred programming languages and data file formats.

Setting The EDITOR Environment Variable

Whichever text editor you choose, remember to set the EDITOR environment variable in your ~/.bashrc file, so that this editor is automatically invoked by command-line tools like your version control system. For example, put this line in your profile to make nano the favored text editor:

export EDITOR="nano"

Setting Up A Directory Structure for Projects

To keep your projects tidy, I would recommend following the Go developer conventions. These guidelines may seem slightly fussy, but they pay off when you have many projects, some of which are on different version control hosts.

First create a top-level directory with a short, generic name like code. By default Go uses a directory called go, but you can change that when you set up a Go installation.

Once you set the top-level directory as the environment variable GOPATH, Go will compile to the bin, doc and pkg subdirectories. You can add the bin directory to your PATH to be able to run the compiled programs by typing their names. You may or may not choose to use these directories with other programming environments.

In this directory, create an src sub-directory. For each repository host, create a subdirectory in src that matches your username. Check out projects in the directory. The final directory structure looks like this:


Creating SSH Keys

You will frequently use SSH to access Git repositories or remote UNIX systems. Solus includes the standard OpenSSH suite of tools.

To create an SSH key, run the ssh-keygen command in a terminal window. For example:

ssh-keygen -t rsa -b 4096 -C "Me MyName (MyDevice) <>"

Use 4096-bit RSA keys for all systems. The older DSA standard only supports 1024-bit keys, which are now too small to be considered secure.

Setting Up Environments

C Compiler

To install GCC and a complete C compiler toolchain on Solus, run this command in a terminal window:

sudo eopkg install -c system.devel

Once the toolchain is installed, you can compile C programs and native extensions for languages like Python and JavaScript.

nvm for Node.js Development

To maintain multiple Node.js versions on your system, use the nvm utility.

Enter this command to install nvm:

 curl -o- | bash

Open a new terminal window and enter this command:

nvm install --lts

This installs the latest LTS release of Node.js, and makes it the default Node.js run-time.

To upgrade the copy of npm that is provided with Node.js, run this command in a terminal window:

npm -g upgrade npm

Developer Tools for Go

Use eopkg to install Go:

sudo eopkg install golang

Current versions of Go do not require a GOPATH environment variable, but you should set it to ensure that third-party tools and Terminal auto-completion work correctly.

Set a GOPATH environment variable in your ~/.bashrc file:

export GOPATH="$HOME/go"

Then, add this to your PATH:


Close the terminal and open it again for the changes to take effect.

Python Development

Solus includes both Python 2 and Python 3. To run Python 3, be sure to specify python3 as the interpreter:

python3 --version

The python interpreter is Python 2, which you should not use for new software.

rustup for Rust Development

The official rustup utility enables you to install the tools for building software with the Rust programming language. Click on the Install button on the front page of the Rust Website, and follow the instructions.

This process installs all of the tools into your home directory, and does not add any files into shared system directories.

The installer does not currently add the correct directory to your PATH. To use your Rust installation, edit the .bashrc file in your home directory to add this line:

source $HOME/.cargo/env

Close the terminal and open it again for the changes to take effect.

The Rust packages from Solus may provide older versions of Rust, and will install the Rust tools into system directories.

Containers and Virtual Machines

Solus provides packages for Docker, as well as including systemd-nspawn for simple containers. The Docker packages for Solus may have more thorough testing and better system integration than the generic Linux packages from the Docker, Inc. Website.

Installing Docker

To install Docker on Solus, enter these commands in a terminal window:

sudo eopkg install docker
sudo systemctl enable docker
sudo systemctl start docker

To enable your user account to manage Docker without administrative privileges, add your user account to the docker group:

sudo usermod -aG docker USERNAME

Replace USERNAME with your username. You must log out and log in again for this change to take effect.

Installing GNOME Boxes

If you need a virtual machine manager, consider using GNOME Boxes to create and manage your virtual machines. To install the Solus package for GNOME Boxes:

sudo eopkg install gnome-boxes

SQL Databases

Consider using Docker containers to provide the database services for your Web applications. This enables you to use different versions of the database servers for different projects, and ensure that you are running the same versions as the database instances on your production systems.

If you prefer to install services directly on to your workstation, Solus provides packages for PostgreSQL and MariaDB. If you need a database server that is compatible with MySQL, install MariaDB. Otherwise, PostgreSQL is often a better choice for new applications.

Installing PostgreSQL

To install PostgreSQL using eopkg, enter these commands in a terminal window:

sudo eopkg install postgresql
sudo systemctl enable postgresql
sudo systemctl start postgresql

These commands install the server, the command-line tools, and the client libraries that are needed to compile adapters for programming languages.

To create a user account for yourself in PostgreSQL with administrative rights, enter this command in a terminal window:

sudo createuser -U postgres -s YOU

Replace YOU with the username of your account on Solus.

The -s option means that your new PostgreSQL account is a superuser, with unlimited rights over the databases. Once you have a superuser account, you may use tools like createuser or log in to databases without using sudo or the -U option.

For example, to create an extra user account that is not a superuser:

createuser EXTRA-ACCOUNT

Replace EXTRA-ACCOUNT with the username of the new account.

Installing MariaDB

To install MariaDB using eopkg, enter these commands in a terminal window:

sudo eopkg install mariadb-server
sudo systemctl enable mariadb
sudo systemctl start mariadb

These commands install the server, the command-line tools, and the client libraries that are needed to compile adapters for programming languages.

For compatibility, MariaDB uses the same names for command-line tools as MySQL.

Remember to set a password for the root accounts. First, login with the mysql command-line utility:

mysql -u root -q

The -q Option Disables Command History: By default, the command-line client stores the full text of every command in a history file. If you know that you are going to run statements that include passwords or other sensitive data, use the -q option.

Once you have logged into MariaDB, run these statements to change the password for root access:

UPDATE mysql.user SET password = PASSWORD('yourpassword') WHERE user
LIKE root;

You now need a password to login to the installation as root. To login with root again, use this command:

mysql -u root -p

Enter the password when prompted.

You should also remove the anonymous accounts and test database that MariaDB automatically includes. Log in to MariaDB and run these statements:

DELETE FROM mysql.user WHERE user = ’’;

Use SQL statements to create additional user accounts.