Skip to content

Instantly share code, notes, and snippets.

@itsdonnix
Last active January 10, 2023 07:51
Show Gist options
  • Save itsdonnix/ab4da88b535b65155be2bdb70c7a8e64 to your computer and use it in GitHub Desktop.
Save itsdonnix/ab4da88b535b65155be2bdb70c7a8e64 to your computer and use it in GitHub Desktop.
Linux Cheatsheets

Linux Cheatshets

Storage Management

List of all mounted storages

cat /proc/self/mounts

Networking

Test if a port is open

nc -vz 127.0.0.1 8080

See nc man page

Check url status code

curl -Is http://localhost:8000/api/users | grep HTTP | cut -d ' ' -f2

Excecute command with SSH

For example, go to directory /var/www directly

ssh  -t user@remote "cd /var/www; bash"

Package Management

Completely reinstall package in Ubuntu

sudo dpkg -i --force-overwrite /var/cache/apt/archives/nodejs_0.10.28-1chl1~trusty1_amd64.deb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment