Skip to content

Raspberry Pi Config Command: Make and Verify One Change

Run sudo raspi-config in a terminal on your Raspberry Pi to open its settings menu. Choose the feature you need, check its current state, and verify the result after changing it.

Open the raspi-config menu

On Raspberry Pi OS, open a terminal or an existing SSH session to the Pi and run:

sudo raspi-config

If sudo asks for a password, enter your Pi account password. The terminal hides the characters as you type. The Setup Options menu should appear.

Use ↑/↓ to highlight an option and Enter to open it. Use Tab to move to Select, Back, or Finish, then press Enter. To leave the main menu, select Finish. If a change prompts for a reboot, save your work and make sure you can reconnect before accepting.

Command not found? Follow the raspi-config error guide to check the OS and package.

Choose the setting you need

Read the labels in your installed version; menu numbers and available options vary by OS image and board.

Official raspi-config main menu showing System, Display, Interface, Performance, Localisation, and Advanced Options

Main menu image © Raspberry Pi Ltd, reproduced unchanged from the official configuration documentation, under CC BY-SA 4.0.

Before you start

You need a working Raspberry Pi OS login and terminal basics. Run configuration and inspection commands on the Pi. Run SSH connection tests on the client computer. By the end, you should be able to locate one needed setting and check whether it works.

Before changing a setting, record its current value, decide how to verify it, and keep a way to restore access. A hostname, network, boot, or serial-console change can affect a remote connection.

Desktop Control Centre is another supported interface; Lite uses the terminal tool. For Ubuntu, use that distribution's settings tools. Keep system maintenance in the first-login update workflow.

Correct the time zone

Read the current value first and record it for recovery:

timedatectl show -p Timezone -p NTPSynchronized
date

If the zone is wrong, select Localisation Options → Timezone in raspi-config and choose your region and city. Alternatively, use the command below with your actual zone. Asia/Tokyo is an example:

1
2
3
sudo timedatectl set-timezone Asia/Tokyo
timedatectl show -p Timezone -p NTPSynchronized
date

Check: Timezone shows your intended zone and date displays the expected local time. Restore the original zone through the same menu or command if you selected the wrong one.

NTP synchronisation also needs a working network and time service. Do not treat a correct time zone as proof that the clock has synchronised.

Enable SSH safely

First check the SSH service on the Pi:

systemctl is-active ssh
systemctl is-enabled ssh

For the usual service setup, active and enabled mean it is running and starts at boot. If SSH already works, test a second login from the client and continue with your task.

To enable it, choose Interface Options → SSH → Enable, or run the corresponding noninteractive command on the Pi:

1
2
3
sudo raspi-config nonint do_ssh 0
systemctl is-active ssh
systemctl is-enabled ssh

For this option, 0 means enable. That convention is not a universal meaning for every subcommand. Success: the normal service is active/enabled and a new login from the client succeeds.

On the client computer, replace the account and host:

ssh your-user@pi-setup.local

Keep an existing session open while testing the second. For custom socket activation, interpret its service/socket policy rather than replacing a working configuration blindly. Key setup belongs in Users and Permissions.

Enable only the hardware interface you need

For an I2C or SPI project, check which interface the peripheral requires and read its current setting in Interface Options. Record that setting before enabling it. The standard 40-pin GPIO I2C bus is usually /dev/i2c-1; other buses depend on your board and overlays.

Choose Interface Options → I2C or SPI, select Enable, then Finish. Follow the tool's reboot prompt when required and reconnect before checking the device. Use the matching command below if you prefer a noninteractive change.

Purpose Example command Post-reboot observation
I2C controller sudo raspi-config nonint do_i2c 0 Relevant /dev/i2c-* device exists
SPI controller sudo raspi-config nonint do_spi 0 Expected /dev/spidev* device exists
1-Wire sudo raspi-config nonint do_onewire 0 Expected controller/device appears when properly configured

After the required reboot, list the exposed devices on the Pi:

# Inspect device names; this does not scan the bus or contact peripherals.
find /dev -maxdepth 1 \( -name 'i2c-*' -o -name 'spidev*' \) -print

If you enabled the wrong interface, return to its menu and restore the original setting. These commands enable separate interfaces, so choose only the one your project uses.

A device node proves only that the interface is exposed, not that a circuit is correctly wired or communicating. Scanning a bus can itself interact with attached hardware; do not scan unknown equipment as a universal test.

The site's existing SSD1306 uses I2C, but the LED/button course uses GPIO character devices and does not require enabling I2C or SPI. Keep the separate protocols distinct.

Serial hardware and the serial login console are separate settings. Changing either can remove a recovery route; use the hardware's specific instructions, voltage limits and an alternate login rather than enabling all interfaces at once.

Language and keyboard settings

Run these checks on the Pi before choosing Localisation Options → Locale or Keyboard:

localectl status
locale

Locale controls language and formatting. Keyboard layout controls how local key presses are interpreted. Select your intended language or physical keyboard layout, then follow the menu's prompts. After logging in again, repeat the checks and test a few characters in a terminal. Over SSH, the client keyboard layout also matters. Restore your recorded setting through the same menu if the result is wrong.

Optional system inventory for diagnosis

These read-only commands collect the OS, tool version, hostname, regional settings, and SSH service state when you need a broader diagnosis.

1
2
3
4
5
6
7
8
cat /etc/os-release
dpkg-query -W raspi-config
command -v raspi-config
hostname
localectl status
timedatectl show -p Timezone -p NTPSynchronized
systemctl is-active ssh
systemctl is-enabled ssh

Understand settings that affect access or persistence

Setting Why it needs a plan
Hostname Clients may need a new name; mDNS can be unavailable
Boot target Desktop selection does not install a missing desktop; automatic login changes local security
Wi-Fi country/network Wrong regulatory settings or credentials can break remote access
OverlayFS A temporary writable layer can discard changes after reboot
Boot order Must retain bootable recovery media
Serial console May be your only recovery terminal

Use NetworkManager for network profiles and stable addresses. Use the OverlayFS guide only when deliberately building a read-only appliance; it is not beginner performance tuning.

Direct config.txt edits are a separate task

Current Raspberry Pi OS uses /boot/firmware/config.txt. Do not add old graphics, GPU-memory or overclocking settings just because a tutorial lists them.

If an actual peripheral requires an overlay, read dtoverlay -h overlay-name on the Pi and check the official config.txt reference. Conditional sections such as [pi4] and [all] matter.

Before a required edit, make a uniquely named backup:

1
2
3
config_backup=$(sudo mktemp /boot/firmware/config.txt.course-backup.XXXXXX)
sudo cp -a /boot/firmware/config.txt "$config_backup"
printf 'Backup: %s\n' "$config_backup"

Record that exact path. Edit with sudo nano /boot/firmware/config.txt, change only the intended setting and review it. Do not edit cmdline.txt for an unrelated setting; if it genuinely needs modification, its parameters must remain on one line.

If the Pi stops booting, power down and use another computer to compare the boot file with that backup, undoing only your last change. Do not replace the entire configuration from another model.

Verify after an intentional reboot

Use sudo reboot only after the required change and once you can recover access. Wait for the board to return; a dropped SSH connection is expected.

Repeat the checks for the setting you changed and test the actual feature. For a headless board, open a new SSH login from the client while keeping your original session open. If it fails, restore the recorded setting through your local or alternate console.

Troubleshooting

  • Command not found: confirm Raspberry Pi OS and its package repositories. Install/repair raspi-config only in that supported context.
  • Noninteractive error: use the interactive menu or inspect the installed implementation. Bare raspi-config nonint is not a universal help command.
  • Feature enabled but inaccessible: check service/device state, account permissions and wiring separately.
  • Lost access after a change: use the prepared local/alternate console and restore the recorded setting; do not make further blind changes.

See raspi-config errors for detailed diagnosis and official configuration documentation for current options.

Check your understanding and continue

Can you state what one selected setting changes, how you will test it, and how to undo it? If your installation already works, knowing how to inspect it is enough.

Next, learn Networking, followed by Users and Permissions.

Donate