diff options
| author | srdusr <[email protected]> | 2023-10-12 23:38:27 +0200 |
|---|---|---|
| committer | srdusr <[email protected]> | 2023-10-12 23:38:27 +0200 |
| commit | e088f597f6faa8be65a8534346f5d2ee2ecf7af7 (patch) | |
| tree | 836ae79af429b1eba337d864bfcab99ff276398a /os/linux/linux-troubleshoot.md | |
| parent | 5ebe1543ea36e2ea9ced2817a0fd864efa27d2e4 (diff) | |
| download | notes-e088f597f6faa8be65a8534346f5d2ee2ecf7af7.tar.gz notes-e088f597f6faa8be65a8534346f5d2ee2ecf7af7.zip | |
Moved linux to new directory 'os'
Diffstat (limited to 'os/linux/linux-troubleshoot.md')
| -rw-r--r-- | os/linux/linux-troubleshoot.md | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/os/linux/linux-troubleshoot.md b/os/linux/linux-troubleshoot.md new file mode 100644 index 0000000..5983360 --- /dev/null +++ b/os/linux/linux-troubleshoot.md @@ -0,0 +1,72 @@ +## Useful troubleshooting commands/tools + +#### Internet/network: + +- ifconfig (install net-tools) + - Manage interface configurations/parameters + - Enable/disable a network interface + - View all available interfaces, IP addresses, hardware addresses + - Assign an IP address and netmask to a selected interface +- ip + - Alternate to ifconfig, display network interfaces and configure network devices + - Interact with layers of TCP/IP protocol (Data link layer and Network layer) + - Can show and modify kernal routing tables (+/- ARP cache entries) + +--- + +#### Reload a program from tty if gui becomes unresponsive + +```bash +$ DISPLAY=:<n> <name of program> +``` + +Example: + +```bash +$ DISPLAY=:0 xterm & +$ DISPLAY=:0 sxhkd & +``` + +--- + +#### Fix pacman keyring errors + +```bash +$ pacman-key --init && pacman-key --populate archlinuxarm +$ sudo rm /var/lib/pacman/db.lck +``` + +--- + +#### Clean package manager's cache (apt/pacman) + +apt: + +```bash +$ sudo apt-get clean +$ sudo apt-get autoclean +``` + +pacman: + +```bash +$ paccache -r # requires pacman-contrib +$ sudo pacman -Scc +``` + +--- + +#### Unlocking a Linux User Account After Too Many Failed Attempts + +```bash +$ faillock --user $USER --reset +``` + +--- + +#### Find top 10 largest files + +```bash +$ find /path/to/dir/ -printf '%s %p\n'| sort -nr | head -10 +$ find . -printf '%s %p\n'| sort -nr | head -10 +``` |