Snippets about linux
20 snippets
-
SNP 124
#316
Rerun a command whenever a file changes
A poor man's watch mode for anything that doesn't have one.
-
SNP 115
#26B
chmod numbers explained
What 755 and 644 actually mean, so you stop copying them blindly.
-
SNP 113
#531
Check when an SSL certificate expires from the terminal
Before the browser warning does it for you.
-
SNP 104
#64B
Run a Node app as a systemd service
Start on boot, restart on crash, logs in journalctl. No pm2 needed.
-
SNP 100
#2B6
tmux basics
Start a long job on a server, close the laptop, come back to it later.
-
SNP 096
#163
Resume a broken download with curl or wget
The 8 GB ISO died at 97%. Don't start over.
-
SNP 080
#259
List listening ports on linux
What is this server actually exposing to the world?
-
SNP 071
#426
Find and replace text in many files with sed
Rename a function across a project from the terminal.
-
SNP 070
#15A
Disable SSH password login on a server
Once your key works, close the door the bots keep knocking on.
-
SNP 065
#513
Check if a port is open from the terminal
Is it the firewall, the service, or me?
-
SNP 062
#295
Find the processes eating your memory
The server is swapping. Who's responsible?
-
SNP 051
#941
Crontab cheat sheet
The five fields, the shortcuts and the two mistakes everybody makes.
-
SNP 047
#459
Copy files with rsync over SSH
Like scp, but it only sends what changed, and it can resume.
-
SNP 043
#591
Create a new user with sudo rights on Ubuntu
Stop working as root on a fresh server.
-
SNP 041
#369
Create a swap file on Ubuntu
Small VPS, no swap, and npm install gets killed. Give it some room.
-
SNP 032
#42B
Generate a random password in the terminal
No password generator website needed.
-
SNP 029
#269
Follow a log file live
Watch a log as it is being written, with and without systemd.
-
SNP 021
#24B
Find the largest files and folders on linux
The disk is full again. Here is how to find what is eating it.
-
SNP 019
#395
Kill the process that is using a port
Find out what is squatting on port 3000 and get rid of it.
-
SNP 014
#52B
Auto mount Samba share on startup in Manjaro
Mount your Samba network share on startup. It even works when you are using WiFi.