Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
computer_science:linux:linux_cheatsheet [2021/03/07 17:29] – [Administration:] carlossousa | computer_science:linux:linux_cheatsheet [2023/12/01 12:07] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 21: | Line 21: | ||
</ | </ | ||
- | |tmux|Opens a shell so the user can logout and the process keeps running in the background.|< | ||
- | tmux | ||
+ | \\ | ||
- | </ | + | |
- | |tmux attach|Attachs the shell to the tmux shell in the background|< | + | ===== tmux ===== |
+ | |||
+ | ^Command^Description^Syntax| | ||
+ | |tmux list-sessions|Shows all live tmux sessions|< | ||
+ | tmux list-sessions | ||
+ | |||
+ | </ | ||
+ | |tmux attach| | ||
tmux attach | 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: ===== | ===== Disks and File Transfer: ===== | ||
- | ^Command^Description^Syntax^Example^Notes| | + | ^Command^Description^Syntax^Notes| |
| \\ scp -r * remoteuser@remoteserver:/ | | \\ scp -r * remoteuser@remoteserver:/ | ||
scp -r * remoteuser@remoteserver:/ | scp -r * remoteuser@remoteserver:/ | ||
- | </ | + | </ |
|du -sh / | |du -sh / | ||
du -sh / | du -sh / | ||
- | </ | + | </ |
|ls|Shows object cont in folder|< | |ls|Shows object cont in folder|< | ||
ls | wc -l | ls | wc -l | ||
- | </ | + | </ |
|<code bash> | |<code bash> | ||
du -smh * | sort -nr | head -15 | du -smh * | sort -nr | head -15 | ||
Line 56: | Line 83: | ||
- | </ | + | </ |
+ | |||
+ | \\ | ||
===== Administration: | ===== Administration: | ||
- | ^Command^Description^Syntax^Example^Notes| | + | ^Command^Description^Syntax^Notes| |
|ip a \\ **OR** \\ ifconfig|Check your machine IPs|< | |ip a \\ **OR** \\ ifconfig|Check your machine IPs|< | ||
ip a | ip a | ||
Line 69: | Line 99: | ||
- | </ | + | </ |
|dmidecode –type memory|Shows the installed memory on your system|< | |dmidecode –type memory|Shows the installed memory on your system|< | ||
dmidecode --type memory | dmidecode --type memory | ||
- | </ | + | </ |
|<code bash> | |<code bash> | ||
find /var/log -type f -regex " | find /var/log -type f -regex " | ||
Line 85: | Line 115: | ||
- | </ | + | </ |
|<code bash> | |<code bash> | ||
for CLEAN in $(find /var/log/ -type f) | for CLEAN in $(find /var/log/ -type f) | ||
Line 100: | Line 130: | ||
- | </ | + | </ |
|< | |< | ||
sudo !! | sudo !! | ||
Line 108: | Line 138: | ||
sudo !! | sudo !! | ||
- | </ | + | </ |
- | |CTRL+x+e | + | |CTRL+x+e |
- | < | + | |fc |Opens the last command in an editor to make it easier to fix it.|< |
+ | fc | ||
- | ls -l | + | </ |
+ | |disown | ||
+ | disown -a && exit | ||
- | </ | + | </ |
\\ | \\ | ||