Notes for GNU/Linux desktop machine setup 🐧
- Images and checksums: https://pop.system76.com/
- ISO signing key fingerprint: https://github.com/pop-os/iso#requirements
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
sudo /sbin/isosize -x <device>
sudo dd if=<device> count=<sector count> bs=<sector size> | sha256sum
sudo ufw default deny incoming
sudo ufw enable
sudo ufw status verbose
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
Install according to the instruction on https://brave.com/linux/.
All profiles:
Developer's profile:
-
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 updateZSH_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
-
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
Set you username, email and specify signing key in Git:
git config --global user.name "Orrin the Knight"
git config --global user.email "[email protected]"
git config --global user.signingkey $KEYID
$KEYID
with your own data.
-
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 [email protected] -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.
-
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"
-
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
-
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
-
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 tosettings.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 }