Skip to content

Debian Cheatsheet

Install and configure sudo

  1. Login as root.

  2. Install sudo using:

    Terminal window
    apt install sudo
  3. (optional) To check who is allowed to use sudo, run:

    Terminal window
    cat /etc/sudoers
  4. To add a user to the sudo group:

    Terminal window
    usermod -aG sudo <username>

Import GitHub SSH Keys onto Linux Server

  1. Install ssh-import-id using:

    Terminal window
    sudo apt install ssh-import-id
  2. Import your GitHub SSH keys using:

    Terminal window
    ssh-import-id-gh <github-username>

Install curl

Install curl using:

Terminal window
sudo apt install curl

Configure auto reboot

Add a line to /etc/crontab to reboot the system at 3:00 AM every day using:

Terminal window
echo "0 3 * * * root /sbin/shutdown -r now" | sudo tee -a /etc/crontab