Linux is allowed as an alternative to an Apple Mac running macOS. Historically this was only allowed for the engineering team, but anyone in GitLab can use Linux. Just bear in mind it is assumed you are capable of self-support when running Linux - there is a #linux channel in Slack where one can exchange tips and tricks, but it is not intended as an official helpdesk resource.
The following is a guide to go over the basics of what is recommended for installation to get you up and running as quickly as possible.
Outside of the basics listed here for all laptop and desktop systems, there are a few additional steps required for Linux. Currently, the recommended laptop for Linux is Dell running Ubuntu, which is discussed in detail here. These instructions assume that setup, so for alternate choices in hardware or Linux distribution it is recommended you use this as a general guideline but adapt as needed.
Dell maintains its own Ubuntu distribution. While not needed to use Linux on Dell, it does seem to offer direct support for various chipsets and hardware components. This means that for a stock Ubuntu (or other distribution) install, generic choices are often made by the installer, and if you wish to take advantage of drivers that better support the hardware, you may have to install and configure drivers for certain components. The Dell Ubuntu distribution removes that burden.
To summarize our install process to meet GitLab standards, we will go the following steps (remember these steps were current as of December 2019):
Hold down the Ctrl key and press t to open a terminal window. Type in the following:
$ df
Create a couple of directories to store backups of some critical information we might need:
$ sudo mkdir /media/mloveless/bkup
$ sudo mkdir /media/mloveless/bkup/apt
We need to make a backup copy of all information regarding sources for updates to our system to our USB drive:
$ sudo cp -R /etc/apt/sources.list* /media/mloveless/bkup/apt/
Next we need to backup and copy signing keys used for verifying packages for future installation and update processes:
$ sudo apt-key exportall > apt.keys
$ sudo cp apt.keys /media/mloveless/bkup
In some cases the "recovery" process when trying to encrypt the hard drive has failed for other team members, in other cases they decided they wanted to use a more recent version of the Ubuntu operating system than what the Dell Ubuntu version is. Either way, you can follow these steps. These steps assume you have the "Backup" USB drive created during the Initial Installation instructions.
If you must configure a fresh Ubuntu install on the Dell yourself, you may not be able to perform any steps involving the "Backup" USB drive. In this case, ignore these steps, but all other instructions remain applicable.
You will need a copy of vanilla Ubuntu copied onto a UEFI bootable USB drive (labeled "Ubuntu", and this will be a fairly straight-forward Ubuntu install. The instructions assume Ubuntu 18.04 or 20.04 LTS, although you can do the same with a later version, including non-LTS versions.
Edit /etc/apt/sources.list, remove the #
symbol to uncomment the line that reads:
# deb http://archive.canonical.com/ubuntu bionic partner
Enter the following commands from a terminal window (the instructions below assume your username is mloveless, change to your username:
$ sudo apt-key add /media/mloveless/bkup/apt.keys
$ sudo cp -R /media/mloveless/bkup/apt/sources.list/* /etc/apt/sources.list.d/
$ sudo apt update
$ sudo apt upgrade -y
$ sudo apt autoremove -y
Enable the firewall with the following command:
$ sudo ufw enable
Some applications used on Linux may require Java. The last open-source version of Oracle Java that was released was in January of 2019. All new versions since then require a paid/licensed scubscription. Therefore GitLab no longer supports Oracle Java, and requires all team-members to use an open-source alternative like OpenJDK. Oracle periodicaly audits all downloads of Oracle Java and actively pursues companies that are out of compliance. The IT department therefore enforces a policy that will remove all instances of Oracle Java that are found on team-members machines
To ensure you are using the correct version, use the java -version
command.
If OpenJDK is installed, the response will look similar to this:
$ java -version
openjdk version "11.0.14.1" 2022-02-08
OpenJDK Runtime Environment (build 11.0.14.1+1-Ubuntu-0ubuntu1.20.04)
OpenJDK 64-Bit Server VM (build 11.0.14.1+1-Ubuntu-0ubuntu1.20.04, mixed mode, sharing)
If Oracle Java is installed, the response will look similar to this:
$ java -version
java version "16.0.1" 2021-04-20
Java(TM) SE Runtime Environment (build 16.0.1+9-24)
Java Hotspot(TM) 64-Bit Server VM (build 16.0.1+9-24, mixed mode, sharing)
Most systems will be running either the OpenJDK version or Java will not be installed. If Java is not installed and you wish to install OpenJDK, follow the instructions for installation you received after running the $ java -version
command. If you are running the Oracle Java version, follow the instructions here for Ubuntu, and for other distributions follow the instructions for package deletion and installation for your specific distribution.
Some GitLab team members have experienced issues with the Nvidia drivers on Dell, including battery drain due to sleep issues when the laptop is closed, random lockups when waking the laptop up, and so on. If this happens, consider the following steps:
Examine the /etc/default/grub file, the line containing GRUB_CMDLINE_LINUX_DEFAULT
may look like this:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
Edit the line to look like this:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash mem_sleep_default=deep
Then update grub:
$ sudo update-grub
This has reported to work with latest versions of the Nvidia drivers (as of Dec 2019) so you can update the drivers.
gcc
git
libssl-dev
make
zlib1g-dev
libereadline-dev
# Prior to Ubuntu 20.04gnupg2
pwgen
scdaemon
yubikey-personalization
asdf
as mentioned above, install a few plugins to
prep yourself to be ready to install a few tools in the future:
asdf plugin-add golang
asdf plugin-add kubectl
asdf plugin-add minikube
asdf plugin-add ruby
asdf plugin-add terraform
asdf install ruby 2.4.4
asdf install terraform 0.11.5
cmake
g++
krb5
libkrb5-dev
libmysqlclient-dev
libpq-dev
libre2-dev
libsqlite3-dev
asdf
as mentioned above, install a few plugins to
prep yourself to be ready to install a few tools in the future:
asdf plugin-add nodejs
asdf plugin-add postgres
asdf plugin-add ruby
asdf install ruby 2.4.4
asdf install nodejs 8.11.3
In order to share the user's screen on GNOME on Wayland, Zoom uses a private schreenshot API to chain successive screenshots into a stream. As GNOME 41, those private D-Bus APIs have been restricted to their intended callers for security reasons, so that hack no longer works..
As a workaround, you can use looking glass to set global.context.unsafe_mode = true
. You can reinstate default security settings either by ending the session, or by running global.context.unsafe_mode = true
.
Some caveats apply to this workaround.