Ubuntu 18.04 LTS is a fantastic OS for general use. Here is a guide with the shell commands for installing it and customizing it.
- Back up files
- Make sure back ups work
- Make boot USB thumb drive with OS image
- Boot from USB drive
- Install OS
- Configure OS
- Install software
1. Back up files
My important files are stored on remote servers and backed up on local external drives to avoid lossing anything.
2. Make sure back ups work
It may seem obvious but its worthwhile to actually test that your most important files actually are backed up and didn't get corrupted or become otherwise inaccessible. I tend to just make important directories are the same size and try opening a few random files, or a few particular very important ones.
3. Make boot USB thumb drive with OS image
You can use any thumb drive with 2GB or more storage. See official tutorial on how to do this here.
4. Boot from thumb drive
On Sager NP7851 I had an issue with the Nvidia drivers and GRUB settings similar to the bug reported here. The proposed fix did work for me:
- Disable Fast Boot and Secure Boot (or Secure loader).
- Plug in the bootable USB with the Linux distro (mine was Ubuntu 18.04)
- When you see the loader to “Install Ubuntu” etc … press “e” and edit a line: Replace “quiet splash” to “nomodeset” and press F10 to boot. Then after the installation is complete, you will have to reboot.
- This time you will now encounter the GRUB. Again, press “e” and edit a line: In the line that starts with “linux”, add
nouveau.modeset=0at the end of that line.
5. Install OS
You can now choose
Install Ubuntu from the GRUB list and follow the install guide. You can also choose to encrypt your hard drive with a password. You do have to enter this password each time you boot up your computer and there is a performance hit however. Think carefully about using it. Follow the installation guide to configure users, passwords, and whatnot and you should have your new OS up and running soon.
6. Configure OS
Connect to your network now if you can because now is a good time to update your system:</p>
sudo apt-get update sudo apt-get upgrade sudo apt autoremove
Now intall the Ubuntu Restricted Extras for media codecs (.mp3 etc):
sudo apt install ubuntu-restricted-extras
Disable touchpad with synclient
sudo apt-get install synclient
add this line to .bashrc:
Hit F2 to enter BIOS (should already know this) and select the XMP memory profile, enable fast boot, and the other chipset features
Remove GRUB boot delay
Edit the grub config at:
Set GRUB_TIMEOUT=0 to not show the menu and directly boot.
Add bugfix Kernel parameters
Edit the grub config:
See here how to edit your GRUB .
Then start with and add cumulatively to:
Known bug in Intel chips running Linux: https://bugzilla.kernel.org/show_bug.cgi?id=117481#c23. For fix info see here.
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_block_gpe=0x6F"
Disable dynamic USB power management in kernel
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_block_gpe=0x6F usbcore.autosuspend=-1"
sudo update-grub to regenerate
/boot/grub/grub.cfg based on the
This can also be done with
sudo grub-mkconfig -o /boot/grub/grub.cfg.
7. Install and configure software packages
These are my frequently used packages and by no means exhaustive. You can use the new Ubuntu Software application or the web and your own discretion to explore the vast ecosystem of available packages.
Install build-tools and essential libraries
sudo apt-get install -y build-essential libssl-dev default-jdk curl vim git vlc shutter gimp firefox vifm
Setup instructions here.
gsettings set org.gnome.desktop.background show-desktop-icons false
sudo apt-get install tmux sudo gem install tmuxinator
Clone DotFiles repo and move .config files to user directory using the rsync script. I added the rsync script so that I could keep my dot files in a central repository and move them to their desired location.
git clone https://github.com/TStesco/DotFiles.git . rsync_src_to_dst.sh
Now do a reboot and log in with i3.
Configure gnome terminal
Open default terminal which should be set in dotfiles (UXTerm). Select preferences as desired. I like to have the menu bar be hidden and use custom colours.
Add the bash completion from: https://github.com/tmuxinator/tmuxinator/blob/master/completion/tmuxinator.bash
Install Sublime Text 3
Follow package manager instructions here. Add the package installer.
Get the latest installer version for your computer and version of Python here and run it with bash.
The community edition is freely available here for all major OS: https://www.docker.com/community-edition
Node volume manager for node.js and npm. Use install script in the master repo: https://github.com/creationix/nvm
sudo add-apt-repository ppa:ubuntu-wine/ppa sudo apt-get update sudo apt-get install -y wine1.7
Additional software packages seldom used: wireshark, nginx, arduino IDE