Last active
March 14, 2026 17:02
-
-
Save santiagosony/4fff281e9122d206b0876e59f8d7ae24 to your computer and use it in GitHub Desktop.
Linux Cheatsheet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ### OS ### | |
| # Get hostname | |
| hostnamectl | |
| hostname | |
| # Get OS release | |
| cat /etc/os-release | |
| uname -a | |
| lsb_release -a | |
| # Repeats the same command by 1 sec | |
| watch -n 1 | |
| # Fix locale mismatch | |
| # enable local in /etc/locale.gen | |
| # and run | |
| locale-gen | |
| # | |
| getent | |
| ### FILES ### | |
| whereis | |
| tree | |
| stat | |
| pwd | |
| ncdu (alt du) | |
| dust (alt du) | |
| fd OR fd-find (alt find) | |
| ### NETWORKING ### | |
| # Get host IP | |
| hostname -i | |
| # Get open ports | |
| netstat -tulpn | |
| ### TEXT ### | |
| # Parse JSON | |
| jq | |
| # Best documentation | |
| tldr | |
| # Draw ins ASCII | |
| figlet | |
| ### GKE ### | |
| # To enable autocomplete for kubectl commands in bash | |
| source <(kubectl completion bash) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment