Skip to content

Instantly share code, notes, and snippets.

@Nexarian
Last active January 20, 2024 21:03
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Nexarian/0ff76054f81738bfacee4e7fe88b234f to your computer and use it in GitHub Desktop.
Save Nexarian/0ff76054f81738bfacee4e7fe88b234f to your computer and use it in GitHub Desktop.
Ubuntu 22.04 setup
#!/usr/bin/env bash
set -e
cd ~
sudo -v
sudo apt-get -y install nvidia-prime vim git mesa-utils net-tools \
gnupg2 software-properties-common apt-transport-https gpg wget \
openssh-server
git config --global core.editor "vim"
INSTALL_DIR=$(mktemp -d)
cd "$INSTALL_DIR"
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb
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
# https://askubuntu.com/questions/1291732/cant-close-authentication-required-window-after-login
alias gnome_fix='dbus-send --type=method_call --dest=org.gnome.Shell /org/gnome/Shell org.gnome.Shell.Eval string:"global.reexec_self()"'
# Update users and watches
sudo sysctl -w fs.inotify.max_user_instances=8192
sudo sysctl -w fs.inotify.max_user_watches=524288
sudo sysctl -p
sudo apt-get update
sudo apt-get -y install code
sudo apt-get -y autoremove
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment