Skip to content

Instantly share code, notes, and snippets.

@RomelSan
Last active October 1, 2023 22:10
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save RomelSan/f68e7e59f91a1b75a9cc923c069444ed to your computer and use it in GitHub Desktop.
Save RomelSan/f68e7e59f91a1b75a9cc923c069444ed to your computer and use it in GitHub Desktop.
First things to do with a Raspberry Pi 4 (Raspbian Lite)

First things to do with a Raspberry Pi 4 (Raspbian Lite)

Initial Changes

  • Change User Password
  • Change Hostname
  • Enable SSH
  • Change Time-Zone
    sudo timedatectl
  • Memory Spit
    sudo raspi-config

Change username

  1. Choose a secure password for the root user.
    sudo passwd root

  2. Logout. And then log back in as the user 'root' using the password you just created. ...

  3. Rename User
    usermod -l newname pi

  4. Assign Home Folder
    usermod -m -d /home/newname newname

  5. Now logout and login back in as newname

  6. If you wish you can disable the root user account again but first double check newname still has
    'sudo' privileges. Check the following update command works:
    groups newname
    sudo apt-get update

  7. If it works then you can disable the root account by locking the password (if you want to)
    sudo passwd -l root

GPIO Terminal Tools for Raspberry Pi

Install WiringPi
sudo apt-get install wiringpi

Usage
gpio readall

Install Pinout (Python3)
sudo apt-get install python3-pip
sudo pip3 install gpiozero

Usage
pinout

Manually enable SSH

Start the SSH service with systemctl

sudo systemctl enable sshd
sudo systemctl start sshd
sudo systemctl restart sshd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment