Skip to content

Instantly share code, notes, and snippets.

@ryanhanwu ryanhanwu/setup.sh
Created Jan 16, 2020

Embed
What would you like to do?
#Ubuntu Setup
## Update Hostname
```
sudo hostname YOUR_HOSTNAME
# UPDATE your hostname and change it to YOUR_HOSTNAME
vim /etc/hostname
# Update your hosts
echo "127.0.0.1 YOUR_HOSTNAME" >> /etc/hosts
```
## Update System
```
sudo apt-get update
sudo apt-get install git vim htop glances ncdu ack-grep
```
## Text Editor
* Vim - https://github.com/spf13/spf13-vim or https://github.com/amix/vimrc
```
curl https://j.mp/spf13-vim3 -L > spf13-vim.sh && sh spf13-vim.sh
```
or
```
git clone https://github.com/amix/vimrc.git ~/.vim_runtime
sh ~/.vim_runtime/install_awesome_vimrc.sh
```
## Shell
* Bash - https://github.com/Bash-it/bash-it
```
git clone --depth=1 https://github.com/Bash-it/bash-it.git ~/.bash_it
~/.bash_it/install.sh
bash-it enable alias docker docker-compose tmux vim apt git
bash-it enable completion awscli vim tmux docker docker-compose git
bash-it enable plugin aws tmux docker-compose docker nginx ssh
```
## Timezone and NTP
```
sudo dpkg-reconfigure tzdata
sudo apt-get -y install ntp
```
* Check the timeoffset
```
/usr/bin/ntpq -np
```
## Create Swap
```
sudo fallocate -l 1G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
sudo /bin/sh -c 'echo "/swapfile swap swap defaults 0 0" >> /etc/fstab'
```
## Docker Engine
1. [Docker Compose](https://docs.docker.com/compose/install/)
1. [Docker + Ubuntu Linux](https://docs.docker.com/install/linux/docker-ce/ubuntu/)
1. https://docs.docker.com/install/linux/linux-postinstall/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.