Install these before continuing.
sudo apt install -y curl xclip build-essential curl htop xclip unzip ubuntu-restricted-extras unrar zip p7zip-full rar whois traceroute font-manager sshfs net-tools tree screen expect ca-certificates gnupg lsb-release software-properties-common make smartmontools cmakesudo apt install -y git git-extras
ssh-keygen -t ed25519 -C "<email>"
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
cat ~/.ssh/id_ed25519.pub
xclip -sel clip < ~/.ssh/id_rsa.pub
ssh -T [email protected]
git config --global user.name "<name>"
git config --global user.email "<email>"See Homebrew on Linux.
mkdir homebrew && curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew
eval "$(homebrew/bin/brew shellenv)"
brew update --force --quiet
chmod -R go-w "$(brew --prefix)/share/zsh"sudo apt install -y flatpak
# sudo add-apt-repository ppa:alexlarsson/flatpak
# sudo apt update
# sudo apt install flatpak
sudo apt install -y gnome-software-plugin-flatpak
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install flathub -yAlso see the following resources:
See Install Docker Engine on Ubuntu, Run the Docker daemon as a non-root user (Rootless mode), then Install the Compose standalone.
# Uninstall old versions
sudo apt-get remove docker docker-engine docker.io containerd runc
sudo apt-get update
# Install latest from repo
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin
# Post installation steps
sudo groupadd docker
sudo usermod -aG docker $USER
# Log out, then back in
newgrp docker
# Start Docker on boot
sudo systemctl enable docker.service
sudo systemctl enable containerd.serviceIf the above doesn’t work, use this:
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu `lsb_release -cs` test"
sudo apt update
sudo apt install docker-ceSee Run the Docker daemon as a non-root user (Rootless mode) for tips, troubleshooting, and best practices.
# Disable system-wide Docker if ir's already running
sudo systemctl disable --now docker.service docker.socket
# If you installed Docker 20.10 or later with RPM/DEB packages, you should have dockerd-rootless-setuptool.sh in /usr/bin.
dockerd-rootless-setuptool.sh install
export PATH=/usr/bin:$PATH
# If the script isn't there, you can install in manually:
sudo apt-get install -y docker-ce-rootless-extrassudo curl -SL https://github.com/docker/compose/releases/download/v2.14.2/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/bin
rustc --versionSee the official documentation if you run into issues or want to configure anything special.
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install -y python3
sudo apt-get install -y python3-pip python3-distutils-extra python3-wheel python3-gi python3-gi-cairo gir1.2-gtk-3.0 gir1.2-poppler-0.18 python3-setuptools
python3 --version
# Remove any previous installations
rm -rf /usr/local/go && tar -C /usr/local -xzf go1.19.4.linux-amd64.tar.gz
# https://gist.github.com/codenoid/4806365032bb4ed62f381d8a76ddb8e6
printf "Checking latest Go version...\n";
LATEST_GO_VERSION="$(curl --silent https://go.dev/VERSION?m=text)";
LATEST_GO_DOWNLOAD_URL="https://golang.org/dl/${LATEST_GO_VERSION}.linux-amd64.tar.gz "
printf "cd to home ($USER) directory \n"
cd "/home/$USER"
printf "Downloading ${LATEST_GO_DOWNLOAD_URL}\n\n";
curl -OJ -L --progress-bar https://golang.org/dl/${LATEST_GO_VERSION}.linux-amd64.tar.gz
printf "Extracting file...\n"
tar -xf ${LATEST_GO_VERSION}.linux-amd64.tar.gz
export GOROOT="/home/$USER/go"
export GOPATH="/home/$USER/go/packages"
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
printf '⚠️ ADD (OR REPLACE) THIS LINE BELOW TO YOUR ~/.bashrc ⚠️
export GOROOT="/home/$USER/go"
export GOPATH="/home/$USER/go/packages"
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
\n'
printf "You are ready to Go!\n";
go versioncurl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.1/install.sh | bash
nvm install node
nvm install 16
nvm use 16
nvm -vAdd the following to .bashrc or .zshrc:
export NVM_DIR="/home/$USER/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvmsudo apt-get install -y zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
# Set zsh as the default shell
chsh -s $(which zsh)
ZSH resources:
- Configuring Zsh Without Dependencies
- ZSH-LOVERS
- awesome-zsh-plugins
- Mastering ZSH
- awesome-devenv
- awesome-sysadmin
- ZSH Reference Card
See this guide for instructions.
# Install the antigen plugin manager
curl -L git.io/antigen > antigen.zsh
sudo apt-get install zsh-antigen
# Load Antigen
source "/path-to-your/antigen.zsh"
# Load Antigen configurations
antigen init ~/.antigenrc
# Turn on an Oh my Zsh plugin
antigen bundle plugin-name
antigen bundle git
antigen bundle command-not-found
antigen bundle docker
# Apply an Oh my Zsh theme
antigen theme theme-name
antigen theme robbyrussell
Example .antigenrc file:
# Load oh-my-zsh library
antigen use oh-my-zsh
# Load bundles from the default repo (oh-my-zsh)
antigen bundle git
antigen bundle command-not-found
antigen bundle docker
# Load bundles from external repos
antigen bundle zsh-users/zsh-completions
antigen bundle zsh-users/zsh-autosuggestions
antigen bundle zsh-users/zsh-syntax-highlighting
# Select theme
antigen theme denysdovhan/spaceship-prompt
# Tell Antigen that you're done
antigen applySee Starship: Cross-Shell Prompt.
# Install Starship
curl -sS https://starship.rs/install.sh | shAdd the following to your .zshrc file:
eval "$(starship init zsh)"Before you can use Oh My Git, you need to install the terminal fonts it uses.
- Download the terminal fonts:
git clone [email protected]:gabrielelana/awesome-terminal-fonts.git - Copy all the fonts from
./builddirectory to~/.fontsdirectory - Copy all the font maps (all
*.shfiles) from./builddirectory to~/.fontsdirectory - Run
fc-cache -fv ~/.fontsto let freetype2 know of those fonts - Customize the configuration file
./config/10-symbols.confreplacingPragmataProwith the name of the font you want to use in the terminal (I will add more fonts in the future so that this step could be skippable) - Copy the above configuration file to
~/.config/fontconfig/conf.ddirectory - Source the font maps (
source ~/.fonts/*.sh) in your shell startup script (eg.~/.bashrcor~/.zshrc)
git clone https://github.com/arialdomartini/oh-my-git.git ~/.oh-my-git && echo source ~/.oh-my-git/prompt.sh >> ~/.zshrcantigen use oh-my-zsh
antigen bundle arialdomartini/oh-my-git
antigen theme arialdomartini/oh-my-git-themes oppa-lana-styleIf you run into trouble, see Vim’s official website, the installation wiki, this StackExchange answer, Building Vim from source, and the INSTALL.md instructions.
See https://github.com/akrawchyk/awesome-vim for tips, resources, and tools.
Follow these instructions to upgrade to the latest version of Vim by building the package from source. Building from source is the best (and most secure) way to get the latest version of Vim. Although many Linux operating systems come with Vim, it's usually at least a few versions behind, and they don't update it often.
- Install all the prerequisite libraries:
sudo apt install -y libncurses5-dev libgtk2.0-dev libatk1.0-dev libcairo2-dev libx11-dev libxpm-dev libxt-dev ruby-dev lua5.2 liblua5.2-dev libperl-dev git- Remove any existing installations of Vim (and associated packages):
sudo apt remove vim vim-runtime gvim vim-tiny vim-common vim-gui-common vim-nox- Download the Vim source files to your home directory:
cd ~ && git clone https://github.com/vim/vim.git && cd vim- Configure the Vim source files to your liking:
./configure --with-features=huge --enable-multibyte --enable-rubyinterp=yes --enable-python3interp=yes --with-python3-config-dir=$(python3-config --configdir) --enable-perlinterp=yes --enable-luainterp=yes --enable-gui=gtk2 --enable-cscopeOr edit the make file in src.
5. Install Vim with checkinstall:
sudo apt install checkinstall
cd ~/vim
sudo checkinstall- Check to make sure you installed Vim successfully:
vim --versionFor more information on building Vim from source, see Vim: Compiling How To.
- Make sure to install the silver searcher tool if you're using the fzs plugin for Vim: ` apt-get install silversearcher-ag.
- Deleting
- To delete a single line, navigate to the line, then type
ddin normal mode. - To delete multiple lines, navigate to the first line you want to delete, then type
dd+ the number of lines to delete. For example, to delete 3 lines, typedd3. - To delete all lines, type
:%din normal mode. - To delete a range of lines by line number, type
:[start_line],[end_line]d. For example, to delete lines 32 through 96, type:32,96d. - To delete the last line, type
:$d - To delete all lines before the current line, type
:1,.-1d. - To delete all lines after the current line, type
:.+1,$d.
- To delete a single line, navigate to the line, then type
- You can use regular expression to perform actions, such as deletion, on matches. For example, to delete all lines that start with the letter 'A', type
:g/^A/d. - To search for a word, type
/then the word. For example,/crabcake. gto go to the top of the file.Pto paste before the cursor position andpto paste after the cursor position.- Jump to previous location:
Ctrl + IandCtrl + O ~to change the case of highlighted text.uto undo..to repeat the last action.yto yank (copy) the selected text andyyto yank the current line.- MACROS
- Start reporting a macro named "a":
qa - Stop recording:
q - Play back the macro named "a":
@a
- Start reporting a macro named "a":
- To search for a something in a code base, type
:Ag <searchTerm>. Ag is the chemical symbol of silver because the plugin that adds this functionality is named The Silver Searcher. - To read the Go documentation for a method, move your cursor to the method, then type
:GoDoc. - To navigate to a specific code line, type
gg+ the code line number (e.g.,gg12for line 12). - Use
:eto reload the Vim gutter to clear the console of errors
- COC default preferences: schema.json
- To access the COC configuration file, use the Vim command
:CocConfig - To install COC plugins, use the Vim command:
:CocInstall <plugin>(e.g.,:CocInstall coc-json&:CocInstall coc-tsserver)
sudo update-alternatives --install /usr/bin/editor editor /usr/local/bin/vim 1
sudo update-alternatives --set editor /usr/local/bin/vim
sudo update-alternatives --install /usr/bin/vi vi /usr/local/bin/vim 1
sudo update-alternatives --set vi /usr/local/bin/vimSee How To Install Java with Apt on Ubuntu 18.04 | DigitalOcean.
sudo apt install -y default-jre
sudo apt install -y openjdk-11-jre-headless
sudo apt install -y openjdk-8-jre-headless
sudo apt install -y default-jdk
java -version
javac -versionCopy the path from your preferred installation. Then open /etc/environment using nano or your favorite text editor:
sudo nano /etc/environmentAt the end of this file, add the following line, making sure to replace the highlighted path with your own copied path, but do not include the bin/ portion of the path:
JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64"Modifying this file will set the JAVA_HOME path for all users on your system.
Save the file and exit the editor.
Now reload this file to apply the changes to your current session:
source /etc/environmentVerify that the environment variable is set:
echo $JAVA_HOMEsudo apt install -y vlc
sudo apt install -y gimp
sudo apt install -y blender
sudo apt install -y github-desktop
sudo apt install -y steam
sudo apt install -y synaptic
sudo apt install -y timeshift
flatpak install com.discordapp.Discord -y
flatpak install pycharm-community -y
# Install bashtop (htop alternative)
sudo add-apt-repository ppa:bashtop-monitor/bashtop && sudo apt update
sudo apt install bashtop -y
# Install VS Code
sudo apt-get install -y wget gpg
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
sudo install -D -o root -g root -m 644 packages.microsoft.gpg /etc/apt/keyrings/packages.microsoft.gpg
sudo sh -c 'echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list'
rm -f packages.microsoft.gpg
sudo apt install -y apt-transport-https
sudo apt update
sudo apt install -y code
# Install ugit to undo git commands
sh -c "$(curl -fsSL https://raw.githubusercontent.com/Bhupesh-V/ugit/master/install)"