Skip to content

Instantly share code, notes, and snippets.

@Tiberriver256
Last active Nov 22, 2018
Embed
What would you like to do?
My Ubuntu development environment setup script
#!/bin/pwsh
Install-Module -Name Get-ChildItemColor, oh-my-posh, posh-git, nvm -Force
md ~\.config\powershell
"Set-Theme -name Darkblood" | Out-File $Profile -Append
Install-NodeVersion 8
Install-NodeVersion 10
Install-NodeVersion 11
Remove-Module PSDesiredStateConfiguration -Force
# Set active Node version in PATH to v11
Set-NodeVersion 11
'Remove-Module PSDesiredStateConfiguration -Force' >> $PROFILE
'Set-NodeVersion 11' >> $PROFILE
#!/bin/bash
sudo apt-get update
# Installing build essentials
sudo apt-get install -y build-essential libssl-dev
# Nodejs and NVM
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash
source ~/.profile
sudo nvm install 8.13.0
sudo nvm install 10.13.0
sudo nvm install latest
sudo nvm use 10.13.0
node -v
# Git - a version control system
sudo apt-get update
sudo apt-get install -y git xclip
# Yeoman - for generators
sudo npm install -g yo
# maven
sudo apt-get install maven -y
# Vim, Curl, Python - Some random useful stuff
sudo apt-get install -y vim curl python-software-properties
sudo apt-get install -y python-dev, python-pip
sudo apt-get install -y libkrb5-dev
# Installing JDK and JRE
sudo apt-get install -y default-jre
sudo apt-get install -y default-jdk
# Archive Extractors
sudo apt-get install -y unace unrar zip unzip p7zip-full p7zip-rar sharutils rar uudeview mpack arj cabextract file-roller
# TLP - saves battery when Ubuntu is installed on Laptops
sudo apt-get remove laptop-mode-tools
sudo add-apt-repository ppa:linrunner/tlp
sudo apt-get update
sudo apt-get install -y tlp tlp-rdw smartmontools ethtool
sudo tlp start
sudo tlp stat
# RPM and alien - sometimes used to install software packages
sudo apt-get install -y rpm
sudo apt-get install -y alien dpkg-dev debhelper
# Docker
curl -fsSL get.docker.com -o get-docker.sh
sh get-docker.sh
# Docker-compose
sudo pip install docker-compose
# VSCode
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo install -o root -g root -m 644 microsoft.gpg /etc/apt/trusted.gpg.d/
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
sudo apt-get install apt-transport-https
sudo apt-get update
sudo apt-get install code # or code-insiders
sudo apt-get install fonts-powerline
# Pwsh
# ---------
# Download the Microsoft repository GPG keys
wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb
# Register the Microsoft repository GPG keys
sudo dpkg -i packages-microsoft-prod.deb
# Update the list of products
sudo apt-get update
# Install PowerShell
sudo apt-get install -y powershell
chsh -s $(which pwsh)
# Finish the setup in PowerShell
sudo pwsh -c "$(curl -fsSL https://gist.github.com/Tiberriver256/ecebdad2b8dca1751dac7198cd1ad26f/raw/04516e155d8cbce6805d129daafdb881790719bd/setup.ps1)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment