Snippets about linux

20 snippets

Back to all snippets

  1. SNP 124 #316

    Rerun a command whenever a file changes

    A poor man's watch mode for anything that doesn't have one.

  2. SNP 115 #26B

    chmod numbers explained

    What 755 and 644 actually mean, so you stop copying them blindly.

  3. SNP 113 #531

    Check when an SSL certificate expires from the terminal

    Before the browser warning does it for you.

  4. SNP 104 #64B

    Run a Node app as a systemd service

    Start on boot, restart on crash, logs in journalctl. No pm2 needed.

  5. SNP 100 #2B6

    tmux basics

    Start a long job on a server, close the laptop, come back to it later.

  6. SNP 096 #163

    Resume a broken download with curl or wget

    The 8 GB ISO died at 97%. Don't start over.

  7. SNP 080 #259

    List listening ports on linux

    What is this server actually exposing to the world?

  8. SNP 071 #426

    Find and replace text in many files with sed

    Rename a function across a project from the terminal.

  9. SNP 070 #15A

    Disable SSH password login on a server

    Once your key works, close the door the bots keep knocking on.

  10. SNP 065 #513

    Check if a port is open from the terminal

    Is it the firewall, the service, or me?

  11. SNP 062 #295

    Find the processes eating your memory

    The server is swapping. Who's responsible?

  12. SNP 051 #941

    Crontab cheat sheet

    The five fields, the shortcuts and the two mistakes everybody makes.

  13. SNP 047 #459

    Copy files with rsync over SSH

    Like scp, but it only sends what changed, and it can resume.

  14. SNP 043 #591

    Create a new user with sudo rights on Ubuntu

    Stop working as root on a fresh server.

  15. SNP 041 #369

    Create a swap file on Ubuntu

    Small VPS, no swap, and npm install gets killed. Give it some room.

  16. SNP 032 #42B

    Generate a random password in the terminal

    No password generator website needed.

  17. SNP 029 #269

    Follow a log file live

    Watch a log as it is being written, with and without systemd.

  18. 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.

  19. SNP 019 #395

    Kill the process that is using a port

    Find out what is squatting on port 3000 and get rid of it.

  20. 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.