Configuration tool for the Raspberry Pi
github.com/RPi-Distro/raspi-config (new)
github.com/asb/raspi-config (old)
Manual
raspi-config, raspberrypi.org
RPi raspi-config, elinux.org
$ which raspi-config /usr/bin/raspi-config $ file /usr/bin/raspi-config /usr/bin/raspi-config: POSIX shell script, ASCII text executable $ sudo cat /proc/device-tree/model Raspberry Pi 3 Model B Rev 1.2 $ whiptail \ --title "abc" \ --backtitle "xyz" \ --menu "Setup Options" 20 30 10 \ --cancel-button Finish \ --ok-button Select \ "1 abc" "A B C" \ "2 xyz" "X Y Z"
INTERACTIVE=True ASK_TO_REBOOT=0 BLACKLIST=/etc/modprobe.d/raspi-blacklist.conf CONFIG=/boot/config.txt # # Interactive use loop # if [ "$INTERACTIVE" = True ]; then [ -e $CONFIG ] || touch $CONFIG calc_wt_size while true; do FUN=$(whiptail --title "Raspberry Pi Software Configuration Tool (raspi-config)" --backtitle "$(cat /proc/device-tree/model)" --menu "Setup Options" $WT_HEIGHT $WT_WIDTH $WT_MENU_HEIGHT --cancel-button Finish --ok-button Select \ "1 Change User Password" "Change password for the current user" \ "2 Network Options" "Configure network settings" \ "3 Boot Options" "Configure options for start-up" \ "4 Localisation Options" "Set up language and regional settings to match your location" \ "5 Interfacing Options" "Configure connections to peripherals" \ "6 Overclock" "Configure overclocking for your Pi" \ "7 Advanced Options" "Configure advanced settings" \ "8 Update" "Update this tool to the latest version" \ "9 About raspi-config" "Information about this configuration tool" \ 3>&1 1>&2 2>&3) RET=$? if [ $RET -eq 1 ]; then do_finish elif [ $RET -eq 0 ]; then case "$FUN" in 1\ *) do_change_pass ;; 2\ *) do_network_menu ;; 3\ *) do_boot_menu ;; 4\ *) do_internationalisation_menu ;; 5\ *) do_interface_menu ;; 6\ *) do_overclock ;; 7\ *) do_advanced_menu ;; 8\ *) do_update ;; 9\ *) do_about ;; *) whiptail --msgbox "Programmer error: unrecognized option" 20 60 1 ;; esac || whiptail --msgbox "There was an error running option $FUN" 20 60 1 else exit 1 fi done fi do_interface_menu() { [...] "P1 Camera" "Enable/Disable connection to the Raspberry Pi Camera" \ "P2 SSH" "Enable/Disable remote command line access to your Pi using SSH" \ "P3 VNC" "Enable/Disable graphical remote access to your Pi using RealVNC" \ "P4 SPI" "Enable/Disable automatic loading of SPI kernel module" \ "P5 I2C" "Enable/Disable automatic loading of I2C kernel module" \ "P6 Serial" "Enable/Disable shell and kernel messages on the serial connection" \ "P7 1-Wire" "Enable/Disable one-wire interface" \ "P8 Remote GPIO" "Enable/Disable remote access to GPIO pins" \ [...] elif [ $RET -eq 0 ]; then case "$FUN" in P1\ *) do_camera ;; P2\ *) do_ssh ;; P3\ *) do_vnc ;; P4\ *) do_spi ;; P5\ *) do_i2c ;; P6\ *) do_serial ;; P7\ *) do_onewire ;; P8\ *) do_rgpio ;; [...] fi }