-
-
Save robzolkos/40baa7b3c27cea3fcded20a950b84359 to your computer and use it in GitHub Desktop.
linux-setup.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# CLI | |
sudo apt update && apt install \ | |
git curl docker.io \ | |
build-essential pkg-config autoconf bison rustc cargo clang \ | |
libssl-dev libreadline-dev zlib1g-dev libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev libjemalloc2 \ | |
libvips imagemagick libmagickwand-dev libsqlite3-0 \ | |
redis-server mysql-server sqlite3 libmysqlclient-dev apache2-utils \ | |
rbenv | |
# UI apps | |
sudo snap install 1password code spotify vlc zoom-client | |
sudo apt install google-chrome-stable | |
# Download Dropbox | |
# curl -fsSL https://www.dropbox.com/download?dl=packages/ubuntu/dropbox_2020.03.04_amd64.deb | sudo dpkg -i | |
# Install Signal | |
wget -O- https://updates.signal.org/desktop/apt/keys.asc | gpg --dearmor > signal-desktop-keyring.gpg | |
cat signal-desktop-keyring.gpg | sudo tee /usr/share/keyrings/signal-desktop-keyring.gpg > /dev/null | |
echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/signal-desktop-keyring.gpg] https://updates.signal.org/desktop/apt xenial main' |\ | |
sudo tee /etc/apt/sources.list.d/signal-xenial.list | |
sudo apt update && sudo apt install signal-desktop | |
# Download caskadia nerd font | |
# curl -fsSL https://github.com/ryanoasis/nerd-fonts/releases/download/v3.1.1/CascadiaMono.zip | |
# Ruby | |
echo 'eval "$(/usr/bin/rbenv init - bash)"' >> ~/.bashrc | |
source ~/.bashrc | |
git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build | |
rbenv install 3.3.0 | |
rbenv global 3.3.0 | |
# No root PW for MySQL for development | |
sudo mysql -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH caching_sha2_password BY ''" | |
# Binstubs | |
echo 'export PATH="./bin:$PATH"' >> ~/.bashrc | |
echo 'set +h' >> ~/.bashrc | |
# Setup git aliases | |
git config --global alias.co checkout | |
git config --global alias.br branch | |
git config --global alias.ci commit | |
git config --global alias.st status | |
git config --global pull.rebase true | |
echo "alias g='git'" >> ~/.bashrc | |
echo "alias gcm='git commit -m'" >> ~/.bashrc | |
echo "alias gcam='git commit -a -m'" >> ~/.bashrc | |
echo "alias gcad='git commit -a --amend'" >> ~/.bashrc | |
# Setup other aliases | |
echo "alias r='./bin/rails'" >> ~/.bashrc | |
source ~/.bashrc | |
# Setup GitHub CLI | |
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \ | |
&& sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \ | |
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \ | |
&& sudo apt update \ | |
&& sudo apt install gh -y | |
gh auth login | |
# Setup GitHub Desktop | |
wget -qO - https://apt.packages.shiftkey.dev/gpg.key | gpg --dearmor | sudo tee /usr/share/keyrings/shiftkey-packages.gpg > /dev/null | |
sudo sh -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/shiftkey-packages.gpg] https://apt.packages.shiftkey.dev/ubuntu/ any main" > /etc/apt/sources.list.d/shiftkey-packages.list' | |
sudo apt update && sudo apt install github-desktop | |
# Setup nodenv | |
git clone https://github.com/nodenv/nodenv.git ~/.nodenv | |
sudo ln -vs ~/.nodenv/bin/nodenv /usr/local/bin/nodenv | |
cd ~/.nodenv | |
src/configure && make -C src || true | |
cd ~/ | |
mkdir -p "$(nodenv root)"/plugins | |
git clone https://github.com/nodenv/node-build.git "$(nodenv root)"/plugins/node-build | |
git clone https://github.com/nodenv/nodenv-aliases.git $(nodenv root)/plugins/nodenv-aliases | |
nodenv install 20.11.1 | |
nodenv global 20.11.1 | |
sudo ln -vs $(nodenv root)/shims/* /usr/local/bin/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment