Last active
August 30, 2020 18:22
-
-
Save dinolupo/852b239d3aa757216920e9b6cd938cb7 to your computer and use it in GitHub Desktop.
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 | |
#################################################### | |
# Ubuntu Linux configuration for WSL 2 # | |
# Author: Dino Lupo # | |
# Release Date: 2020/08/30 # | |
#################################################### | |
# Install Ubuntu latest with WSL version 2 | |
# then launch it and copy this file in Ubuntu with | |
# | |
# Copy-Item -Path wsl2-init.sh -Destination \\wsl$\Ubuntu\home\dino | |
# | |
if (( $EUID == 0 )); then | |
echo "Please do not use this command with sudo" | |
exit | |
fi | |
sudo apt-get update | |
sudo apt upgrade | |
# zsh configuration | |
sudo apt install zsh | |
git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh | |
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc | |
sed -i 's/robbyrussell/agnoster/g' ~/.zshrc | |
chsh -s $(which zsh) | |
echo "source /etc/environment" >> ~/.zshrc | |
# | |
# ZSH Syntax Highlighting | |
# | |
# https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/INSTALL.md | |
# | |
mkdir .zsh | |
cd .zsh | |
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git | |
echo "source ${HOME}/.zsh//zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ~/.zshrc | |
cd .. | |
# vim configuration | |
cat << EOF > ~/.vimrc | |
filetype plugin indent on | |
syntax on | |
:colorscheme elflord | |
:set tabstop=3 | |
:set shiftwidth=3 | |
" Clear last search highlighting | |
nnoremap <Space> :noh<cr> | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment