Users & Groups

Apt

Snap

SMB

Installing SMB server on Ubuntu

Update alternatives for common commands

Ubuntu keeps track of the default programs by maintaining a list of symbolic links, under /etc/alternatives directory. Each entry here is a shortcut points to the actual program, which may have more than one option (i.e. alternatives).

C/C++

Java

Go

Python

LLVM

GitHub

NodeJS

AWS

Installation

Installing Ubuntu the hard way

hdiutil convert ~/Downloads/ubuntu.iso -format UDRW -o ~/Downloads/ubuntu.img
mv ~/Downloads/ubuntu.img.dmg ~/Downloads/ubuntu.img
diskutil list
diskutil unmount /dev/disk2
sudo dd if=${HOME}/Downloads/ubuntu.img of=/dev/disk2 bs=1m
diskutil eject /dev/disk2

Enable automatic login

Using privileged admin account open up terminal or your favorite text editor and edit the configuration file /etc/gdm3/custom.conf

Change the following snippet from

Before you begin editing, your configuration might look like this:

[daemon]
# Uncoment the line below to force the login screen to use Xorg
#WaylandEnable=false

# Enabling automatic login
#  AutomaticLoginEnable = true
#  AutomaticLogin = USERNAME

Change the file so that it instead looks like this:

[daemon]
# Uncoment the line below to force the login screen to use Xorg
#WaylandEnable=false

# Enabling automatic login
AutomaticLoginEnable = true
AutomaticLogin = USERNAME

You will need root/administrator privileges to perform this operation. Uncommenting the above lines will enable automatic login for the linuxconfig user. Change the username to suit your needs.

Snap Packages

Ubuntu is migrating away from using Debian's Apt to manage packages, and toward using Canonical's Snapcraft

They wrote an article titled How to keep your Linux disk usage nice and and tidy where I learned you can reduce the number of prior package versions that Snapcraft keeps, which by default, is three.

snap set system refresh.retain=2

Distribution Upgrades

Ubuntu 20.04 "Focal Fossa" has just released, so I thought I'd write a guide on how to upgrade.

  1. Sign in to the root user

    sudo -i
    
  2. Update the /etc/apt/sources.list, replace any entries of bionic or eoal with focal

    sed -i 's/bionic/focal/g' /etc/apt/sources.list
    
  3. Run the apt commands below

    apt update
    apt upgrade
    apt full-upgrade
    apt install -y update-manager-core
    reboot
    do-release-upgrade -d
    
  4. Verify successful upgrade by checking the current distribution number

    lsb_release -a
    

Google Cloud SDK

Vim