Skip to content

Notes for Pop!_OS GNU/Linux desktop machine setup 🐧

License

Notifications You must be signed in to change notification settings

marekciupak/linux-desktop-setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 

Repository files navigation

Linux Desktop setup

Notes for GNU/Linux desktop machine setup 🐧

Preparing installation media of Pop!_OS

mkdir pop-os_22.04_amd64_intel_21 && cd "$_"

wget https://iso.pop-os.org/22.04/amd64/intel/21/pop-os_22.04_amd64_intel_21.iso
wget https://iso.pop-os.org/22.04/amd64/intel/21/SHA256SUMS
wget https://iso.pop-os.org/22.04/amd64/intel/21/SHA256SUMS.gpg

gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys 63C46DF0140D738961429F4E204DD8AEC33A7AFF
gpg --verify SHA256SUMS.gpg SHA256SUMS

sha256sum --check SHA256SUMS

sudo dd if=pop-os_22.04_amd64_intel_21.iso of=<device> bs=4M; sync

Calculating checksum of already created media:

sudo /sbin/isosize -x <device>
sudo dd if=<device> count=<sector count> bs=<sector size> | sha256sum

Before connecting to the network

Firewall

sudo ufw default deny incoming
sudo ufw enable

sudo ufw status verbose

DNS

Cloudflare’s public DNS resolver that blocks malicious content: https://developers.cloudflare.com/1.1.1.1/setup/linux/

  • IPv4: 1.1.1.2, 1.0.0.2
  • IPv6: 2606:4700:4700::1112, 2606:4700:4700::1002

After connecting to the network

Web browser: Brave

Install according to the instruction on https://brave.com/linux/.

Extensions worth installing:

All profiles:

Developer's profile:

Zsh

  • Install Zsh and set it as a default shell:

    sudo apt install zsh
    chsh -s $(which zsh)

    ⚠️ You may need to logout and login again to load Zsh shell.

  • Install Oh My Zsh:

    sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
  • Install Powerline Fonts:

    sudo apt install fonts-powerline
  • Edit ~/.zshrc file and update ZSH_THEME= to:

    ZSH_THEME="agnoster"
  • Edit ~/.zshrc file and the following lines at the end:

    export EDITOR='vim'
    
    DEFAULT_USER=`whoami`
    
    HISTFILE=$HOME/.zsh_history
    HISTSIZE=10000
    SAVEHIST=10000
    
    setopt APPEND_HISTORY           # append rather than overwrite history file.
    setopt EXTENDED_HISTORY         # save timestamp and runtime information
    setopt HIST_EXPIRE_DUPS_FIRST   # allow dups, but expire old ones when I hit HISTSIZE
    setopt HIST_FIND_NO_DUPS        # don't find duplicates in history
    setopt HIST_IGNORE_ALL_DUPS     # ignore duplicate commands regardless of commands in between
    setopt HIST_IGNORE_DUPS         # ignore duplicate commands
    setopt HIST_REDUCE_BLANKS       # leave blanks out
    setopt HIST_SAVE_NO_DUPS        # don't save duplicates
    setopt INC_APPEND_HISTORY       # write after each command
    setopt SHARE_HISTORY            # share history between sessions

fzf

  • Install fzf:

    sudo apt install fzf
  • Edit ~/.zshrc file and the following lines at the end:

    # fzf (based on the instruction in /usr/share/doc/fzf/README.Debian)
    source /usr/share/doc/fzf/examples/key-bindings.zsh
    source /usr/share/doc/fzf/examples/completion.zsh

Git

Set you username, email and specify signing key in Git:

git config --global user.name "Orrin the Knight"
git config --global user.email "email@example.com"
git config --global user.signingkey $KEYID

⚠️ Don't forget to replace "Orrin the Knight", "email@example.com" and $KEYID with your own data.

GitHub

  • Assign a specific key for authentication in ~/.ssh/config:

    Host github.com
      IdentitiesOnly yes
      IdentityFile ~/.ssh/id_rsa_yubikey.pub
    
  • Verify and pin the GitHub's public SSH key:

    ssh git@github.com -vvv

    If you are doing this for the first time, you should be asked for the server public key fingerprint.

    You can find it on the official GitHub page: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/githubs-ssh-key-fingerprints:

    SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8 (RSA)
    SHA256:br9IjFspm1vxR3iA35FWE+4VTyz1hYVLIE2t1/CeyWQ (DSA - deprecated)
    SHA256:p2QAMXNIC1TJYWeIOttrVc98/R1BUFWu3/LiyKgUfQM (ECDSA)
    SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU (Ed25519)
    

    Copy-paste the relevant fingerprint and press Enter.

Exa

  • Install exa:

    sudo apt install exa
  • Edit ~/.zshrc file and the following lines at the end:

    # exa
    alias l="exa -a -l -H -S --time-style long-iso -m -g --color-scale --group-directories-first"
    alias lt="exa -a -l -H -S --time-style long-iso -m -g --color-scale --group-directories-first -T"

asdf

  • Install asdf:

    git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.11.2
  • Add the following to ~/.zshrc:

    # asdf
    . "$HOME/.asdf/asdf.sh"
    # append completions to fpath
    fpath=(${ASDF_DIR}/completions $fpath)
    # initialise completions with ZSH's compinit
    autoload -Uz compinit && compinit
  • Install plugins:

    # necessary if you have already installed asdf plugins some time ago
    asdf plugin-update --all
    
    # install the latest version of Erlang (required for Elixir)
    sudo apt install libwxgtk-webview3.0-gtk3-dev libssh-dev build-essential autoconf libncurses5-dev xsltproc fop libxml2-utils
    asdf plugin add erlang https://github.com/asdf-vm/asdf-erlang.git
    asdf install erlang latest
    asdf global erlang latest
    
    # install the latest version of Elixir
    asdf plugin-add elixir https://github.com/asdf-vm/asdf-elixir.git
    asdf install elixir latest
    asdf global elixir latest
    
    # install the latest version of Rust
    asdf plugin-add rust https://github.com/asdf-community/asdf-rust.git
    asdf install rust latest
    asdf global rust latest
    
    # install the latest LTS version of Node.js
    asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs.git
    open https://nodejs.org/en # check the latest LTS version
    asdf install nodejs latest:20
    asdf global nodejs latest:20
    npm install -g npm

Other

  • Show weekday and seconds in GNOME top panel

    gsettings set org.gnome.desktop.interface clock-show-weekday true
    gsettings set org.gnome.desktop.interface clock-show-seconds true

VS Code

  • Install VS Code: https://code.visualstudio.com/#alt-downloads.

  • Press Cmd + p, type > Preferences: Open User Settings (JSON), press Enter, and paste the following settings to settings.json:

    {
        "workbench.startupEditor": "none",
        "telemetry.telemetryLevel": "off",
        "settingsSync.keybindingsPerPlatform": false,
        "json.schemaDownload.enable": false,
        "update.showReleaseNotes": false,
        "workbench.settings.enableNaturalLanguageSearch": false,
        "workbench.enableExperiments": false,
        "workbench.cloudChanges.continueOn": "off",
        "workbench.cloudChanges.autoResume": "off",
        "editor.tabSize": 2,
        "editor.autoClosingBrackets": "never",
        "editor.rulers": [
            120
        ],
        "explorer.confirmDragAndDrop": false,
        "explorer.confirmDelete": false,
        "files.insertFinalNewline": true,
        "files.trimTrailingWhitespace": true,
        "files.trimFinalNewlines": true,
        "editor.autoClosingOvertype": "never",
        "editor.autoClosingQuotes": "never",
        "editor.minimap.enabled": false
    }

About

Notes for Pop!_OS GNU/Linux desktop machine setup 🐧

Resources

License

Stars

Watchers

Forks