| Both sides previous revisionPrevious revisionNext revision | Previous revision |
| linux_cheat_sheet [2026/08/21 03:22] – [Bash Shortcuts] stephen | linux_cheat_sheet [2026/09/22 03:16] (current) – stephen |
|---|
| |
| * Use ''apt-get'' in scripts, ''apt'' manually in interactive terminals. | * Use ''apt-get'' in scripts, ''apt'' manually in interactive terminals. |
| | |
| | ===== System Shortcuts ===== |
| | |
| | | Ctrl + Alt + Esc | Restart Cinnamon desktop (X11 only) | |
| |
| ===== Bash Shortcuts ===== | ===== Bash Shortcuts ===== |
| | ''sudo apt install smartmontools'' \\ ''sudo smartctl -a /dev/sda'' | Check disk SMART status. | | | ''sudo apt install smartmontools'' \\ ''sudo smartctl -a /dev/sda'' | Check disk SMART status. | |
| | ''rm -r [directory_name]'' | Delete a directory and everything in it. | | | ''rm -r [directory_name]'' | Delete a directory and everything in it. | |
| | | ''ln -s [target_file] [link_name]'' | Make a symbolic link. | |
| | | File System - Permissions || |
| | ''sudo chmod +x /usr/local/bin/sign-kernel'' | Make a file executable. | | | ''sudo chmod +x /usr/local/bin/sign-kernel'' | Make a file executable. | |
| | ''sudo chmod a+rwx /DirectoryName'' | Give everyone access. | | | ''sudo chmod a+rwx /DirectoryName'' | Give everyone access. | |
| | ''ln -s [target_file] [link_name]'' | Make a symbolic link. | | | ''sudo chown -R stephen /DirectoryName'' | Change ownership recursively. | |
| | | ''sudo chown -R stephen:stephen /DirectoryName'' | Change group recursively. | |
| | | Groups || |
| | | ''getent group'' or ''cat /etc/group'' | List groups and who is in them. | |
| | | ''groups'' or ''id -nG'' | List groups //I// am in. | |
| | | ''groups [user]'' | List groups //I// am in. | |
| | | ''sudo usermod -aG [group] [user]'' | Add user to a group (restart terminal to take effect). | |
| | Disk Mounting || | | Disk Mounting || |
| | ''df -hP'' | List mount points. | | | ''df -hP'' | List mount points. | |