Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| engineering:computer_science:linux:linux_cheatsheet [2024/08/16 13:56] – removed - external edit (Unknown date) 127.0.0.1 | engineering:computer_science:linux:linux_cheatsheet [2026/01/11 15:45] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Linux Cheatsheet ====== | ||
| + | |||
| + | [[engineering: | ||
| + | |||
| + | ===== Jobs: ===== | ||
| + | |||
| + | ^Command^Description^Syntax^Example^Notes| | ||
| + | |jobs|List jobs running in the background|< | ||
| + | jobs | ||
| + | |||
| + | |||
| + | </ | ||
| + | |bg|Changes a job to the background.|< | ||
| + | bg %n | ||
| + | |||
| + | |||
| + | </ | ||
| + | |fg|Changes a job to the foreground.|< | ||
| + | fg %n | ||
| + | |||
| + | |||
| + | </ | ||
| + | |||
| + | \\ | ||
| + | |||
| + | |||
| + | ===== tmux ===== | ||
| + | |||
| + | ^Command^Description^Syntax| | ||
| + | |tmux list-sessions|Shows all live tmux sessions|< | ||
| + | tmux list-sessions | ||
| + | |||
| + | </ | ||
| + | |tmux attach| \\ Attaches to the last active tmux session. \\ \\ The session can be specified. \\ |< | ||
| + | tmux attach | ||
| + | |||
| + | </ | ||
| + | tmux attach-session -t < | ||
| + | |||
| + | </ | ||
| + | |CTRL+B - D|Dettachs to the current tmux session|< | ||
| + | CTRL+B - D | ||
| + | |||
| + | </ | ||
| + | |CTRL+B - %|Creates a New Horizontally Aligned Tab|< | ||
| + | CTRL+B - % | ||
| + | |||
| + | </ | ||
| + | |CTRL+B - " | ||
| + | CTRL+B - " | ||
| + | |||
| + | </ | ||
| + | |CTRL+B - Arrows|Moves to existent Tabs|< | ||
| + | CTRL+B - Arrows | ||
| + | |||
| + | </ | ||
| + | |||
| + | \\ | ||
| + | |||
| + | |||
| + | ===== Disks and File Transfer: ===== | ||
| + | |||
| + | ^Command^Description^Syntax^Notes| | ||
| + | | \\ scp -r * remoteuser@remoteserver:/ | ||
| + | scp -r * remoteuser@remoteserver:/ | ||
| + | |||
| + | </ | ||
| + | |du -sh / | ||
| + | du -sh / | ||
| + | |||
| + | </ | ||
| + | |ls|Shows object cont in folder|< | ||
| + | ls | wc -l | ||
| + | |||
| + | |||
| + | </ | ||
| + | |<code bash> | ||
| + | du -smh * | sort -nr | head -15 | ||
| + | |||
| + | |||
| + | </ | ||
| + | du -smh * | sort -nr | head -15 | ||
| + | |||
| + | |||
| + | </ | ||
| + | |||
| + | \\ | ||
| + | |||
| + | |||
| + | ===== Administration: | ||
| + | |||
| + | ^Command^Description^Syntax^Notes| | ||
| + | |ip a \\ **OR** \\ ifconfig|Check your machine IPs|< | ||
| + | ip a | ||
| + | |||
| + | |||
| + | </ | ||
| + | ifconfig | ||
| + | |||
| + | |||
| + | </ | ||
| + | |dmidecode –type memory|Shows the installed memory on your system|< | ||
| + | dmidecode --type memory | ||
| + | |||
| + | |||
| + | </ | ||
| + | |<code bash> | ||
| + | find /var/log -type f -regex " | ||
| + | find /var/log -type f -regex " | ||
| + | |||
| + | |||
| + | </ | ||
| + | find /var/log -type f -regex " | ||
| + | find /var/log -type f -regex " | ||
| + | |||
| + | |||
| + | </ | ||
| + | |<code bash> | ||
| + | for CLEAN in $(find /var/log/ -type f) | ||
| + | do | ||
| + | cp / | ||
| + | done | ||
| + | |||
| + | |||
| + | </ | ||
| + | for CLEAN in $(find /var/log/ -type f) | ||
| + | do | ||
| + | cp / | ||
| + | done | ||
| + | |||
| + | |||
| + | </ | ||
| + | |< | ||
| + | sudo !! | ||
| + | |||
| + | </ | ||
| + | nano / | ||
| + | sudo !! | ||
| + | |||
| + | </ | ||
| + | |CTRL+x+e | ||
| + | |fc |Opens the last command in an editor to make it easier to fix it.|< | ||
| + | fc | ||
| + | |||
| + | </ | ||
| + | |disown -a && exit |Exit Terminal but leave all processes running|< | ||
| + | disown -a && exit | ||
| + | |||
| + | </ | ||
| + | |||
| + | \\ | ||
| + | |||