3 March, 2021

DevOps Notes

Here are some tasks that a dev-ops might use.

Shutdown or Restart

sudo reboot
sudo shutdown -h now

Install and Update

sudo apt install unzip
sudo apt list --installed
sudo apt update
sudo apt list --upgradable
sudo apt upgrade
sudo apt autoremove

Remove packages

sudo apt remove mysql-server

Todo

Use tmux to split the console in two.

Create a .ssh/config file

Host 1
  Hostname 192.100.100.3
  Port 22
  User phyrum

bash

Ctrl+a - Go to the start of line

Ctrl+e - Go to the end of line

Ctrl+d - Delete character

Ctrl+w - Delete word on the left

Ctrl+k - Delete rest of line

Ctrl+u - Delete all left from cursor

!! - Use previous command

Ctrl+y - Paste

Alt+f - Go to next word

Alt+b - Go to previous word

Alt+. - Paste last parameter

Alt+t - Swap previous 2 words

Alt+u - Uppercase next word

Alt+l - Lowercase next word

Ctrl+l - Clear screen

tmux

Ctrl+b d - Detach, tmux attach-session

Ctrl+b c - Open secend window

Ctrl+b l - Last window

Ctrl+b p - Previous window

Ctrl+b 0 - Go to window 0

Ctrl+b [ - Copy mode

Ctrl+b % - Split window vertically (left/right arrow switch window)

Ctrl+b " - Split window horizontally (up/down arrow switch window)

Ctrl+b z - Zoom window