Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
November 12, 2020 09:41 pm GMT

Things I always install on Ubuntu

I have a short attention span for desktop Linux and take the destroy-everything-and-start-again approach to system configuration, so I reinstall Ubuntu a lot. Heres a rough list of stuff that I set up on a clean installation. Im assuming 20.04 LTS but this should mostly apply for later versions.

Keyboard layout

Find this in Settings > Language and Region > Input Sources.

Keyboard preview of English (intl., with AltGr dead keys) in GNOME

I use a layout listed as English (intl., with AltGr dead keys). This gives me easy access to typographical quotes () and a few other non-ASCII characters that I use frequently on keyboards with a right Alt key. Do this first because switching between layouts is just confusing.

Google Chrome

Download and install the deb from the Google Chrome (UK) downloads page with Firefox. I use both browsers.

1Password

Install the 1Password X Chrome extension and 1Password X Firefox extension.

I keep all of my account details in 1Password so I install it early on. Theres no desktop app for Linux; Ive used the op CLI occasionally but mostly I just copy and paste from the browser addons.

cURL

sudo apt install curl
Enter fullscreen mode Exit fullscreen mode

This is pretty essential because I have no idea how to use wget. Some of the following scripts also use it.

NextDNS

curl -sSL https://nextdns.io/repo.gpg | sudo apt-key add -sudo add-apt-repository 'deb https://nextdns.io/repo/deb stable main'sudo apt install nextdnssudo nextdns install \  -config "$NEXTDNS_ID" \  -report-client-info \  -auto-activate
Enter fullscreen mode Exit fullscreen mode

where $NEXTDNS_ID is your configuration ID, found at my.nextdns.io. There is also an install script at sh -c "$(curl -sSL https://nextdns.io/install)".

I use NextDNS instead of browser plugins to block ads and trackers at the DNS level, and move my DNS traffic away from my ISP.

Git

sudo add-apt-repository ppa:git-core/ppasudo apt updatesudo apt install git
Enter fullscreen mode Exit fullscreen mode

The package in the default repositories can lag behind a few minor versions and I occasionally want to use new features. Homebrew requires git.

Homebrew (Linuxbrew)

Add to ~/.profile:

if [ -z "$HOMEBREW_PREFIX" ]; then    export HOMEBREW_PREFIX="/home/linuxbrew/.linuxbrew"    export HOMEBREW_CELLAR="$HOMEBREW_PREFIX/Cellar"    export HOMEBREW_REPOSITORY="$HOMEBREW_PREFIX/Homebrew"    export PATH="$HOMEBREW_PREFIX/bin:$HOMEBREW_PREFIX/sbin${PATH+:$PATH}"    export MANPATH="$HOMEBREW_PREFIX/share/man${MANPATH+:$MANPATH}:"    export INFOPATH="$HOMEBREW_PREFIX/share/info:${INFOPATH:-}"fi
Enter fullscreen mode Exit fullscreen mode

then

. ~/.profile/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
Enter fullscreen mode Exit fullscreen mode

The test for $HOMEBREW_PREFIX ensures that the paths are appended to only once, when ~/.profile is sourced at login, and not in subsequent login shells or when ~/.profile is sourced manually as above.

The Homebrew documentation recommends adding a line like eval $(/path/to/brew shellenv) to ~/.profile instead. Theres probably a very good reason for this; I use the above approach to avoid errors on startup if /path/to/brew disappears for some reason (it happens, Im trigger-happy with my rm -rfs.)

Fish shell

brew install fish
Enter fullscreen mode Exit fullscreen mode

and suppress the default greeting:

fish -c 'set -U fish_greeting'
Enter fullscreen mode Exit fullscreen mode

Fish is like Bash with a conscience. It isnt a POSIX shell so I leave the default shell as Bash, allowing me to paste random scripts Ive found on the internet into GNOME Terminal without having to think too hard.

The following commands still assume Bash.

Neovim

brew install neovim
Enter fullscreen mode Exit fullscreen mode

and add to ~/.profile:

if [ -x "$HOMEBREW_PREFIX/bin/nvim" ]; then    export EDITOR="$HOMEBREW_PREFIX/bin/nvim"fi
Enter fullscreen mode Exit fullscreen mode

I mostly use nvim for the Alt-e command editor in Fish.

GitHub CLI

brew install ghgh auth login
Enter fullscreen mode Exit fullscreen mode

gh is an easier way to interact with GitHub repos.

bat

brew install bat
Enter fullscreen mode Exit fullscreen mode

Like cat with a pager and syntax highlighting. A drop-in replacement for cat if used in a pipeline.

exa

brew install exa
Enter fullscreen mode Exit fullscreen mode

An almost drop-in replacement for ls with some nice defaults.

fd

brew install fd
Enter fullscreen mode Exit fullscreen mode

A much more intuitive alternative to find.

ripgrep

brew install rg
Enter fullscreen mode Exit fullscreen mode

A very fast alternative to grep.

Volta

Add to ~/.profile:

if [ -z "$VOLTA_HOME" ]; then    export VOLTA_HOME="/home/volta/.volta"    export PATH="$VOLTA_HOME/bin:$PATH"fi
Enter fullscreen mode Exit fullscreen mode

then

. ~/.profilesudo mkdir -p $VOLTA_HOMEsudo chown $USER:$USER $VOLTA_HOME/bin/bash -c "$(curl -fsSL https://get.volta.sh)" -- --skip-setup
Enter fullscreen mode Exit fullscreen mode

Add fish completions:

mkdir -p .config/fish/completionsvolta completions fish > .config/fish/completions/volta.fish
Enter fullscreen mode Exit fullscreen mode

Volta is the nicest Node.js version manager that Ive used. The installer defaults to ~/.volta; Im putting it in its own home directory for consistency with Linuxbrew.

Node.js

volta install node
Enter fullscreen mode Exit fullscreen mode

Installs the current LTS, which is generally a sensible system default.

Yarn

volta install yarn
Enter fullscreen mode Exit fullscreen mode

Currently installs Yarn 1.x. Yarn recommends using the system yarn to install per-project yarns.

degit

volta install degit
Enter fullscreen mode Exit fullscreen mode

A really nice alternative to git clone or downloading archives from GitHub.

JetBrains Mono

degit --force JetBrains/JetBrainsMono/fonts/otf ~/.local/share/fonts/JetBrainsMono
Enter fullscreen mode Exit fullscreen mode

Rerun this command to update the font. Check JetBrains Mono releases for updates. The version listed on the homepage was a few releases behind the GitHub repo when this was written and did not include OTF files.

I really like JetBrains Mono. Im the kind of person for whom terminal support for programming ligatures cant come soon enough.

Visual Studio Code

Download and install the deb from the Visual Studio Code home page.

~/.config/Code/User/settings.json looks a bit like this:

{  "window.titleBarStyle": "custom",  "window.dialogStyle": "custom",  "terminal.integrated.shell.linux": "/home/linuxbrew/.linuxbrew/bin/fish",  "terminal.integrated.automationShell.linux": "/usr/bin/bash",  "editor.fontFamily": "'JetBrains Mono', 'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'",  "editor.fontLigatures": true}
Enter fullscreen mode Exit fullscreen mode

Original Link: https://dev.to/davidjones418/things-i-always-install-on-ubuntu-3m44

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To