Repository navigation
Bash cheat sheet
linkjes
- https://linuxize.com/cheatsheet/bash/
- https://linuxstans.com/bash-cheat-sheet/
- https://linuxbasecamp.com/cheat-sheets/bash
- https://www.w3schools.com/bash/bash_commands.php
cd [directory]:
change directory
cd ..:
go back one folder
pwd:
print working directory
ls [option][directory]:
list directory contents
mkdir [directory]:
create a new directory
rmdir [directory]:
remove a directory
cp [source][destinations]:
copy files or directories
mv [source][destinations]:
move or rename files or directions
rm [options][file]:
remove files or directions
touch [file]:
create an empty file
tar [options][files/directions]:
create or extra tar archives
gzip [file]:
compress a file
gunzip [file.gz]:
decompress a gzipped file
zip [archive.zip][file/directions]:
create a zip archive
unzip [archive.zip]:
extract files from a zip archive
cat [file]:
output the contents of a file
head [options][file]:
output the first lines of a file
tail [options][file]:
output the last lines of a file
less [file]:
view the contents of a file interactively
grep [pattern][file]:
search for a pattern in a file
wc [options][file]:
count the number of lines, words, or characters in a file
chmod [permissions][file]:
change the permissions of a file or directory
chown [user:group][file]:
change the owner and group of a file or directory
chgrp [group][file]:
change the group of a file or directory
umask[mask]:
set the default file permissions for newly created files
ps [options]:
display information about active processes
kill [process_ID]:
terminate a process
top:
display and manage the top processes
bg [job_ID]:
move a job to the background
fg [job_ID]:
bring a background job to the foreground
history:
show command history
sudo:
run as administrator
man <cmd>:
read the manual