Fresh Ubuntu / Pop!_OS Installation

04-01-2021 / Edit on Github

The basic steps I often do every time I install a new Ubuntu system. The order of things is important.

πŸ‘‰ Linux note.
πŸ‘‰ Windows fresh start
πŸ‘‰ Mac fresh start
πŸ‘‰ Bash

Most of commands are for both Ubuntu and Pop!_OS, there are some which are only for Pop!_OS.

For Pop!_OS: You don't need to do everything in below steps.

  1. Download Ubuntu ISO. If you like a MacOS-like version, you can choose Elementary OS.

  2. [Pop!_OS] Download Pop!_OS (with NVIDIA)

  3. Using Rufus (on Windows) or Etcher (on any system) or popsicle (usb flasher, on pop!_os) to create a bootable USB drives.

  4. Update & Upgrade

    sudo apt update & sudo apt upgrade
  5. Download and install Google Chrome.

    1. Sign in to Google Account + sync all extensions + settings.
    2. Disable Tab hover information: Go to chrome://flags/ and search "tab hover" then choose "Disable".
    3. Install also these extensions:
      1. mate translate, google dictionary, TabCloud, raindrop, last pass, AVIM, adblock, GNOME Shell integration.
      2. Google Aut alternative on Chrome: use this.
  6. Install Guake Terminal (drop-down terminal supporting tabs). We install it first because we working mainly on terminal.

    sudo apt-get install guake
    # then add it to startup applications
    #
    # load preferences
    guake --restore-preferences ~/Downloads/guake_prefs
  7. Install git

    sudo add-apt-repository ppa:git-core/ppa
    sudo apt update
    sudo apt install git
  8. [Pop!_OS] Dual boot with Windows and others Linux distro: different from Ubuntu (using grub), Pop!_OS uses systemd-boot -> follow this guide.

    # 1. Open Disks
    # Click on "play" icon on the partition having "Partition type" is "EFI system"
    #
    # 2. Run to check the mount point of these partitions
    lsblk -o NAME,FSTYPE,FSSIZE,MOUNTPOINT
    # output (s/t like that)
    # nvme0n1
    # β”œβ”€nvme0n1p1 vfat 176M /media/thi/ESP # <- this is windows mounting point
    # β”œβ”€...
    # └─nvme0n1p9 vfat 511M /boot/efi
    #
    # 3. copy to pop!_os
    sudo cp -r /media/thi/ESP/EFI/Microsoft /boot/efi/EFI
    #
    # 4. Add timeout (wait for choosing)
    sudo nano /boot/efi/loader/loader.conf
    # add below others
    timeout 15

    πŸ‘‰ If above doesn't work, try using this tool (rEFInd).

  9. Make emojis showing up

    sudo apt install fonts-noto-color-emoji

    After that (make browser regonize more icons), create a new file

    ~/.config/fontconfig/conf.d/01-emoji.conf

    with this content.

  10. Clone firstly repos: scripts, dinhanhthi.com.

  11. Change user avatar and desktop background.

  12. [Ubuntu only] Auto install drivers

    sudo ubuntu-drivers autoinstall

    In case you wanna switch between Intel (more power efficient) and NVDIA driver (more powerful)

    sudo prime-select intel
    sudo prime-select nvidia
  13. [Ubuntu only] Check the NVDIA driver and install the newest version: check in Additional Drivers. In case you wanna remove it and reinstall it later, use

    sudo apt purge nvidia-*
  14. Install GNOME Tweaks from App Store.

  15. Install Dash to panel extension and use this config for pop and this for ubuntu.

  16. [Ubuntu only] Install GNOME Shell extensions

    sudo apt install gnome-shell-extensions

    Install also chrome extension. Go to the corresponding extension link and turn it on and install it. List of useful extensions: Start Overlay in Application View, ESC to close overview from applications list, Caffein, Alt-Tab Switcher Popup Delay Removal, Sound Input & Output Device Chooser, gtile, icon-hider (on gnome taskbar), Emoji selector.

  17. Install video codecs,

    sudo apt install ubuntu-restricted-extras
  18. Log in to online accounts: Google, Ubuntu One, StackOverflow, Notion, Trello, Facebook,...

  19. Download and install an email client, I use Mailspring. Log in to email accounts and let Mailspring downloads the necessary things.

  20. Install GoldenDict (app store) and dictionaries.

  21. Python is installed on Ubuntu system with 2 versions. By default, python prefers version 2, if you wanna use python 3, you can use python3 or add an alias

    alias python='python3' # and call python 2 as `python2`

    Install pip

    pip sudo apt install python3-pip
    alias pip=pip3
  22. Visual Studio Code and its basic extensions: Bracket Pair Colorizer, Docker, Linux Themes for VS Code, Markdown All in One, Markdown Shortcuts, Remote Development, Python, Auto Close Tags

    Also add below settings to setting json file (Ctrl + Shift + P and search "Preferences: Open Settings (JSON)", it's in ~/.config/Code/User)

  23. Install Git Client as Gitkraken. Log in with Github account and clone all working repositories.

  24. Turn off Gnome Shell Activities Animations (click on window taskbar to toggle max/min),

    gsettings set org.gnome.desktop.interface enable-animations true # enable
    gsettings set org.gnome.desktop.interface enable-animations false # disable
  25. IBUS Bamboo, Vietnamese Input Method. Need to restart Ibus and choose Bamboo in the keyboard layout. You can use also Shift + ~ for changing the options (remove the underline, for example). Use Super + Space to change between input methods.

  26. Google Drive client for Ubuntu: OverGrive (5$ for each account). An alternative to Vgrive.

    # startup commandline for overgrive
    python3 /opt/thefanclub/overgrive/overgrive
  27. LaTeX

    sudo apt-get install texlive-full # 5GB
    sudo apt-get install texmaker
  28. If you install Matlab, you can install matlab-support to add matlab icon to applications. Note that, if matlab exe file is at /usr/local/MATLAB/R2017b/bin/matlab, we add the location of folder as /usr/local/MATLAB/R2017b/.

  29. Use super + E to open File Manager: change in Keyboard shortcut.

  30. Default text editor gedit, you can use this command in terminal.

  31. Gnome Calendar in app store.

  32. Screen Recorder, use Kazam (app store). If cannot recognize mic and speaker, read this solution. An alternative is SimpleScreenRecorder.

  33. VLC (app store). If there is a problem of displaying video (there is only sound without video), check this.

  34. Read SD card

    sudo apt-get install exfat-utils exfat-fuse
  35. If you wanna make nautilus default again:

    xdg-mime default nautilus.desktop inode/directory application/x-gnome-saved-search
    gsettings set org.gnome.desktop.background show-desktop-icons true
  36. If you wanna make some web app a desktop app, use nativefier.

  37. Bluetooth problem on Dell XPS 15 only: cannot turn on bluetooth β‡’ Try turn off and turn on again the bluetooth in BIOS setting.

  38. Useful shortcuts:

    • Capture fullscreen: Ctrl+Alt+Print (photos will be saved in Pictures)
    • Show desktop: set in Keyboards settings, try to find "Hide all normal windows".
  39. [Only Ubuntu] Connect Airpod to Ubuntu 20.04:

    # check bluetooth service is running
    hciconfig -a
    #
    # open a file
    sudo nano /etc/bluetooth/main.conf
    #
    # add
    ControllerMode = bredr
    #
    # restart bluetooth service
    sudo /etc/init.d/bluetooth restart
    #
    # disconnect other headphone device
    # press and hold backward button in the airpod case (flash light)
    # connect to airpod as other device via bluetooth
  40. Location of .desktop files,

    ~/.local/share/applications/
    /usr/share/applications/
    /var/lib/snapd/desktop/applications/
    # or
    locate *.desktop # bash
    locate \*.desktop # zsh
  41. [Optional]Xbox controller bluetooth connection: check this.

  42. Remove icon from dash application

    sudo add-apt-repository ppa:caldas-lopes/ppa
    sudo apt-get update
    sudo apt-get install ezame
  43. Restore dconf setting:

    dconf load / < dconf-settings.ini
    # or
    cat dconf-settings.ini | dconf load /
  44. Restore custom keyboard shortcuts,

    # load
    dconf load /org/gnome/desktop/wm/keybindings/ < keybindings.dconf
    dconf load /org/gnome/settings-daemon/plugins/media-keys/ < keybindings.dconf
  45. [Optional] Disable touchpad automatically when plugging mouse:

    sudo add-apt-repository ppa:atareao/atareao
    sudo apt update
    sudo apt install touchpad-indicator
    # then open > click on icon > preferences
    # > action tab > "Disable touchpad when mouse plugged"
  46. Other applicatons:

    1. Skype
    2. Extreme Download Manager (uninstall by running as root /opt/xdman/uninstall.sh)
    3. AO (MS to do for Ubuntu): snap install ao
    4. Shotwell or gThumb (image viewer + quick editor, install on Store)
    5. KolourPaint (photo editor supports cut and move a selection like Paint on Windows, install from AppStore)
    6. Cheese (camera app)
    7. Drawing
    8. Stacer (optimizer system like Advanced System Care)
    9. Youtube Music
    10. Authenticator
    11. alacarte (Main Menu, can be found in App Store): change/add icon in launcher.
  47. Swap function keyboards on Logitech K380, using this tool (try all keyboard hidraws if you are not sure!).

  48. Force Unity Dash to index all files on Home: sudo updatedb (install by sudo apt-get install mlocate)

  49. [Only Ubuntu] There are 2 ubuntu softwares in dash? (ref this question). "Ubuntu software" is pre-installed snap store (run by snap-store), the other is gnome-software.

  50. Backup before installing a new system.

    • Settings in ~/.config/ or ~/.<software-name>
    • All apps in ~/apps/ with their desktop files in ~/.local/share/applications/
  51. Pop!_OS Tips:

    1. Super + Y: toggle tiling mode.
    2. Add a windows/applition exepton of tiling mode (it won't be counted)
    3. Make clocks + dates 2 lines -> tutorial.
    • Install clock override extension.
    • Using %H:%M%n%d/%m/%Y in text to display instead of the clock (with the spaces so that they are center aligned).