Linux VPS

SSH, packages, services and everyday Linux administration.

  • Add a swap file on a Linux VPS

    Create a swap file, make it survive reboots, tune swappiness, and learn when swap helps and when you really need more RAM.

    • Beginner
    • Linux VPS
    • 2 min read
  • Deploy a Python app with Gunicorn, systemd and Nginx

    Set up a virtual environment, run your Flask or Django app with Gunicorn as a systemd service, and serve it through Nginx with HTTPS.

    • Intermediate
    • Linux VPS
    • 2 min read
  • Use SSH keys in PuTTY with Pageant

    Log in to your Linux VPS with an SSH key in PuTTY, either by pointing a saved session at a .ppk file or by loading keys into the Pageant agent, and start Pageant automatically with Windows.

    • Intermediate
    • Linux VPS
    • 5 min read
  • Set the time zone and keep the clock in sync (NTP)

    Pick the right time zone with timedatectl, keep the clock accurate with systemd-timesyncd or chrony, and avoid surprises with cron and logs.

    • Beginner
    • Linux VPS
    • 2 min read
  • Give a user sudo access to specific commands only

    Grant a Linux user root rights for a short list of commands, such as restarting one service, using Cmnd_Alias and full paths, and avoid the wildcard and shell-escape traps.

    • Advanced
    • Linux VPS
    • 5 min read
  • Lock, unlock or disable a Linux user account

    Stop a Linux user from logging in without deleting them. Lock the password, expire the account, set a nologin shell, check the status and unlock it again later.

    • Beginner
    • Linux VPS
    • 5 min read
  • Add a user to a group in Linux

    Add an existing Linux user to a group with usermod -aG or gpasswd, check the result with id, understand why a new login is needed, and remove a user from a group.

    • Beginner
    • Linux VPS
    • 4 min read
  • Set different permissions for files and folders recursively

    Fix a whole folder tree in one go, giving directories 755 and files 644 with find, or using chmod's capital X, without making every file executable.

    • Intermediate
    • Linux VPS
    • 5 min read
  • Edit the sudoers file safely with visudo

    Change who can use sudo without breaking it. Learn the sudoers syntax, use visudo and drop-in files in /etc/sudoers.d, and grant full or limited admin rights.

    • Intermediate
    • Linux VPS
    • 5 min read
  • Install WordPress on a LEMP stack (Nginx, MariaDB, PHP)

    Build a LEMP stack on Ubuntu or Debian, create the database, configure wp-config.php and Nginx for PHP-FPM, then finish the WordPress installer over HTTPS.

    • Intermediate
    • Linux VPS
    • 3 min read
  • umask: control default permissions for new files

    Understand how umask decides the permissions of every new file and folder, choose between 022 and 002, and set it per user, per systemd service and for SFTP uploads.

    • Intermediate
    • Linux VPS
    • 5 min read

Other topics