rphovley / bash_training

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bash!

Slides

Google Slides

Common bash commands

ls
cd
mkdir
touch
cat
ps
chown & chmod
./file.sh
history
grep
rm

Bash Cheatsheet

!line_number (run command from history at line_number)
!! (previous commands)
ctrl-x, ctrl-e (edit current command in vim)
man some_mysterious_command (get docs on how to use command)
sudo !! (sudo the previous command)
tldr (truncated version of man to install)
pwd (present working directory)
source (runs shell file in the same terminal, used often to activate aliases)
clear (command+k)
cd - (previous directory)
cd ~ (home directory)

Super Duper Cheatsheet

Aliases

Add aliases to ~/.zshrc ~/.bashrc or ~/bash_profile (depending on your os. .zshrc is used on newer macs) so aliases are active in any terminal you open

About


Languages

Language:Shell 100.0%