- Change root password
$ passwd
- Create user & their home directory
$ useradd -m <username>
- Set user's password
$ passwd <username>
- Make user a sudoer
$ usermod -aG sudo <username>
- Set user's shell as bash
$ chsh -s /bin/bash <username>
- Install essentials:
$ sudo apt update && sudo apt upgrade && sudo apt install nano curl git htop exa
- Enable passwordless sudo for user
$ sudo nano /etc/sudoers.d/<username>
- Add:
<username> ALL=(ALL) NOPASSWD: ALL
- Copy SSH public key to remote machine's authorized keys
$ ssh-copy-id -i <public-key-path> <username>@<remote-machine-ip-address>
- Edit SSH daemon configuration
$ sudo nano /etc/ssh/sshd_config
- Disable root access
- Edit:
PermitRootLogin no
- Edit:
- Disable password authentication
- Edit:
PasswordAuthentication no
- Edit:
- Restart ssh service:
$ sudo /etc/init.d/ssh restart
- Install zsh and ohmyzsh
$ sudo apt install zsh
- ohmyzsh
- Install Homebrew
- Install essentials:
brew install micro fzf bat restic just
- Install Docker
- Schedule cleanup of unused Docker images
- Open crontab
$ crontab -e
- Create a new cronjob
- Append:
0 1 * * * sudo docker system prune -af
- Append:
- Open crontab
- Give sudo (
secure_path
in/etc/sudoers
) and crontab (PATH=
incrontab -e
) access to tools inPATH