Last active
October 30, 2023 22:46
-
-
Save pedrodsrodrigues/93294791904ec506ef52c850111c9787 to your computer and use it in GitHub Desktop.
Prepare your (WSL) Ubuntu Machine Environment
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
#!/usr/bin/env bash | |
touch ${HOME}/.hushlogin | |
sudo -v | |
sudo apt-get update && sudo apt-get upgrade -y | |
### Brew ### | |
yes | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
(echo; echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"') >> ${HOME}/.profile | |
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" | |
sudo apt-get install build-essential -y | |
brew install gcc | |
### Stuff ### | |
brew install neovim pre-commit kubernetes-cli helm tfenv awscli fzf git-crypt nmap thefuck asdf pygments dive gum gh | |
yes | /home/linuxbrew/.linuxbrew/opt/fzf/install | |
set rtp+=/home/linuxbrew/.linuxbrew/opt/fzf | |
export PATH="$PATH:~/.local/bin/" | |
eval $(thefuck --alias fuck) | |
### ZSH ### | |
sudo apt-get install zsh -y | |
yes | sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" | |
chsh -s $(which zsh) | |
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting | |
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions | |
git clone https://github.com/zsh-users/zsh-completions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-completions | |
# Create ~/.zshrc (creates a backup of current file if it exists) | |
zshrc="${HOME}/.zshrc" | |
zshrc_backup="${HOME}/.zshrc_bk" | |
if [ -f "${zshrc}" ]; then | |
mv "${zshrc}" "${zshrc_backup}" | |
echo "Backup of ${zshrc} created in: ${zshrc_backup}" | |
fi | |
curl -o ~/.zshrc https://gist.githubusercontent.com/pedrodsrodrigues/0f5528048f00e4676ef607909412979e/raw/581fb6e49c68b9b5d970f0fbe469c26789cf9a52/.zshrc | |
# Create ~/.aliases | |
curl -o ~/.aliases https://gist.githubusercontent.com/pedrodsrodrigues/ca812b5dc9b90f5a7a2bfb4b14b85e8b/raw/46c647defb8cb77c5b93cb434f2c693963296a40/.aliases | |
### | |
Green='\033[0;32m' | |
echo -e "\n${Green}Finished! Please reopen the terminal." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment