Skip to content

Instantly share code, notes, and snippets.

@markstinson
Forked from damoclark/raspi-config.txt
Last active August 20, 2022 16:55
Show Gist options
  • Select an option

  • Save markstinson/17e045773eb8a4b4707694b3aa80ea7b to your computer and use it in GitHub Desktop.

Select an option

Save markstinson/17e045773eb8a4b4707694b3aa80ea7b to your computer and use it in GitHub Desktop.

Revisions

  1. markstinson revised this gist Aug 20, 2022. 1 changed file with 10 additions and 11 deletions.
    21 changes: 10 additions & 11 deletions raspi-config.txt
    Original file line number Diff line number Diff line change
    @@ -20,10 +20,10 @@ sed -e 's/$//' -e 's/^\s*/\/usr\/bin\/raspi-config nonint /' | bash -x -
    #
    # Additional files to create in your SD Card boot partition:
    #
    # * ssh # this should be an empty file - it enables the ssh server
    # * ssh.txt # this should be an empty file - it enables the ssh server
    #
    # * userconf.txt # it will have the new default username and its encrypted passwd.
    # To create userconf.txt, run the following in a bash terminal (WSL, Cygwin, any one will do)
    # * userconf.txt # starting with Bullseye, you must create a default username and passwd.
    # To create userconf.txt, run the following in a bash terminal (WSL, Cygwin, any bash will do)
    # Be sure to change pi:raspberry to what ever you want -- you'll need openssl installed:
    #
    # echo "pi:$(echo 'raspberry' | openssl passwd -6 -stdin)" > userconf.txt
    @@ -40,10 +40,8 @@ sed -e 's/$//' -e 's/^\s*/\/usr\/bin\/raspi-config nonint /' | bash -x -
    # ssid="network_name"
    # psk="password"
    # }
    #
    #
    #
    # After booting the Raspberry Pi, login as user 'pi' and run following command:
    # After booting the Raspberry Pi, login as user 'pi' (or whomever) and run following command:
    #
    # sudo /boot/raspi-config.txt
    #
    @@ -54,12 +52,12 @@ do_boot_wait 0 # Turn on waiting for network before booting
    do_boot_splash 1 # Disable the splash screen
    do_overscan 1 # Disable overscan
    do_camera 1 # Disable the camera
    # do_ssh 0 # Enable remote ssh login, un comment if not use the boot/ssh file
    # do_ssh 0 # Enable remote ssh login, uncomment if not using the boot/ssh file
    do_spi 1 # Disable spi bus
    do_memory_split 16 # Set the GPU memory limit to 16, 32, or 64MB
    do_i2c 1 # Enable the i2c bus
    do_serial 1 # Enable the 3.3v TTL serial bus
    do_boot_behaviour B1 # Boot to CLI & require login
    do_boot_behavior B1 # Boot to CLI & require login
    # B1 # Boot to CLI & require login
    # B2 # Boot to CLI & auto login as pi user
    # B3 # Boot to Graphical & require login
    @@ -84,7 +82,8 @@ do_change_locale en_US.UTF-8 # Set language to US English
    # do_wifi_ssid_passphrase wifi_name password # Set wlan0 network to join 'wifi_name' network using 'password'


    # Don't add any raspi-config configuration options after 'END' line below & don't remove 'END' line
    # Do NOT add any raspi-config configuration options after 'END' line below
    # and DO NOT remove 'END' line
    END

    ############# CUSTOM COMMANDS ###########
    @@ -98,6 +97,6 @@ END
    # /usr/bin/apt update # Update the software package information
    # /usr/bin/apt upgrade # Upgrade installed software to the latest versions

    # /usr/bin/raspi-config do_change_pass # Interactively set password for your login
    # /usr/bin/raspi-config do_change_pass # Interactively set password for your login

    # /sbin/shutdown -r now # Reboot after all changes above complete
    # /sbin/shutdown -r now # Reboot after all changes above complete
  2. markstinson revised this gist Aug 20, 2022. 1 changed file with 39 additions and 12 deletions.
    51 changes: 39 additions & 12 deletions raspi-config.txt
    Original file line number Diff line number Diff line change
    @@ -16,8 +16,33 @@ sed -e 's/$//' -e 's/^\s*/\/usr\/bin\/raspi-config nonint /' | bash -x -
    #
    # macOS and GNU/Linux use UNIX-style line endings - use whatever editor you like
    #
    # Then drop the file into the boot partition of your SD card
    # Then drop the file into the boot partition of your SD Card
    #
    # Additional files to create in your SD Card boot partition:
    #
    # * ssh # this should be an empty file - it enables the ssh server
    #
    # * userconf.txt # it will have the new default username and its encrypted passwd.
    # To create userconf.txt, run the following in a bash terminal (WSL, Cygwin, any one will do)
    # Be sure to change pi:raspberry to what ever you want -- you'll need openssl installed:
    #
    # echo "pi:$(echo 'raspberry' | openssl passwd -6 -stdin)" > userconf.txt
    #
    # * wpa_supplicant.conf # this can have your WiFi creds, and skip the wifi stuff below.
    # it should contain the following:
    #
    # country=us
    # update_config=1
    # ctrl_interface=/var/run/wpa_supplicant
    #
    # network={
    # scan_ssid=1
    # ssid="network_name"
    # psk="password"
    # }
    #
    #
    #
    # After booting the Raspberry Pi, login as user 'pi' and run following command:
    #
    # sudo /boot/raspi-config.txt
    @@ -29,7 +54,7 @@ do_boot_wait 0 # Turn on waiting for network before booting
    do_boot_splash 1 # Disable the splash screen
    do_overscan 1 # Disable overscan
    do_camera 1 # Disable the camera
    do_ssh 0 # Enable remote ssh login
    # do_ssh 0 # Enable remote ssh login, un comment if not use the boot/ssh file
    do_spi 1 # Disable spi bus
    do_memory_split 16 # Set the GPU memory limit to 16, 32, or 64MB
    do_i2c 1 # Enable the i2c bus
    @@ -47,17 +72,19 @@ do_audio 0 # Auto select audio output device
    # G1 # Enable Full KMS Opengl Driver - must install deb package first
    # G2 # Enable Fake KMS Opengl Driver - must install deb package first
    # G3 # Disable opengl driver (default)
    #do_rgpio 1 # Enable gpio server - must install deb package first
    # do_rgpio 1 # Enable gpio server - must install deb package first

    # System Configuration
    do_configure_keyboard # Autodetect keyboard
    do_hostname rpi-test # Set hostname to 'rpi-up'
    do_wifi_country US # Set wifi country as US
    do_wifi_ssid_passphrase wifi_name password # Set wlan0 network to join 'wifi_name' network using 'password'
    do_hostname rpi # Set hostname to 'rpi'
    do_change_timezone America/Chicago # Change timezone to US CST/CDT
    do_change_locale en_US.UTF-8 # Set language to US English
    # uncomment do_wifi stuff if not using the recommended boot/wpa_supplicant.conf
    # do_wifi_country US # Set wifi country as US
    # do_wifi_ssid_passphrase wifi_name password # Set wlan0 network to join 'wifi_name' network using 'password'


    #Don't add any raspi-config configuration options after 'END' line below & don't remove 'END' line
    # Don't add any raspi-config configuration options after 'END' line below & don't remove 'END' line
    END

    ############# CUSTOM COMMANDS ###########
    @@ -66,11 +93,11 @@ END

    # Some examples - uncomment by removing '#' in front to test/experiment

    #/usr/bin/raspi-config do_wifi_ssid_passphrase # Interactively configure the wifi network
    # /usr/bin/raspi-config do_wifi_ssid_passphrase # Interactively configure the wifi network

    #/usr/bin/apt update # Update the software package information
    #/usr/bin/apt upgrade # Upgrade installed software to the latest versions
    # /usr/bin/apt update # Update the software package information
    # /usr/bin/apt upgrade # Upgrade installed software to the latest versions

    #/usr/bin/raspi-config do_change_pass # Interactively set password for your login
    # /usr/bin/raspi-config do_change_pass # Interactively set password for your login

    #/sbin/shutdown -r now # Reboot after all changes above complete
    # /sbin/shutdown -r now # Reboot after all changes above complete
  3. markstinson revised this gist Aug 20, 2022. 1 changed file with 12 additions and 10 deletions.
    22 changes: 12 additions & 10 deletions raspi-config.txt
    Original file line number Diff line number Diff line change
    @@ -27,14 +27,15 @@ sed -e 's/$//' -e 's/^\s*/\/usr\/bin\/raspi-config nonint /' | bash -x -
    # Hardware Configuration
    do_boot_wait 0 # Turn on waiting for network before booting
    do_boot_splash 1 # Disable the splash screen
    do_overscan 1 # Enable overscan
    do_camera 1 # Enable the camera
    do_overscan 1 # Disable overscan
    do_camera 1 # Disable the camera
    do_ssh 0 # Enable remote ssh login
    do_spi 1 # Disable spi bus
    do_memory_split 64 # Set the GPU memory limit to 64MB
    do_i2c 1 # Disable the i2c bus
    do_serial 1 # Disable the RS232 serial bus
    do_memory_split 16 # Set the GPU memory limit to 16, 32, or 64MB
    do_i2c 1 # Enable the i2c bus
    do_serial 1 # Enable the 3.3v TTL serial bus
    do_boot_behaviour B1 # Boot to CLI & require login
    # B1 # Boot to CLI & require login
    # B2 # Boot to CLI & auto login as pi user
    # B3 # Boot to Graphical & require login
    # B4 # Boot to Graphical & auto login as pi user
    @@ -43,17 +44,18 @@ do_audio 0 # Auto select audio output device
    # 1 # Force audio output through 3.5mm analogue jack
    # 2 # Force audio output through HDMI digital interface
    #do_gldriver G1 # Enable Full KMS Opengl Driver - must install deb package first
    # G1 # Enable Full KMS Opengl Driver - must install deb package first
    # G2 # Enable Fake KMS Opengl Driver - must install deb package first
    # G3 # Disable opengl driver (default)
    #do_rgpio 1 # Enable gpio server - must install deb package first

    # System Configuration
    do_configure_keyboard # Autodetect keyboard
    do_hostname rpi-test # Set hostname to 'rpi-up'
    do_wifi_country AU # Set wifi country as Australia
    do_wifi_country US # Set wifi country as US
    do_wifi_ssid_passphrase wifi_name password # Set wlan0 network to join 'wifi_name' network using 'password'
    do_change_timezone Australia/Brisbane # Change timezone to Brisbane Australia
    do_change_locale en_AU.UTF-8 # Set language to Australian English
    do_change_timezone America/Chicago # Change timezone to US CST/CDT
    do_change_locale en_US.UTF-8 # Set language to US English

    #Don't add any raspi-config configuration options after 'END' line below & don't remove 'END' line
    END
    @@ -66,8 +68,8 @@ END

    #/usr/bin/raspi-config do_wifi_ssid_passphrase # Interactively configure the wifi network

    #/usr/bin/aptitude update # Update the software package information
    #/usr/bin/aptitude upgrade # Upgrade installed software to the latest versions
    #/usr/bin/apt update # Update the software package information
    #/usr/bin/apt upgrade # Upgrade installed software to the latest versions

    #/usr/bin/raspi-config do_change_pass # Interactively set password for your login

  4. @damoclark damoclark revised this gist Jan 20, 2019. 1 changed file with 9 additions and 9 deletions.
    18 changes: 9 additions & 9 deletions raspi-config.txt
    Original file line number Diff line number Diff line change
    @@ -24,18 +24,11 @@ sed -e 's/$//' -e 's/^\s*/\/usr\/bin\/raspi-config nonint /' | bash -x -
    #
    ############# EDIT raspi-config SETTINGS BELOW ###########

    # System Configuration
    do_configure_keyboard # Autodetect keyboard
    do_wifi_country AU # Set wifi country as Australia
    do_wifi_ssid_passphrase wifi_name password # Set wlan0 network to join 'wifi_name' network using 'password'
    do_change_locale en_AU.UTF-8 # Set language to Australian English
    do_change_timezone Australia/Brisbane # Change timezone to Brisbane Australia

    # Hardware Configuration
    do_boot_wait 0 # Turn on waiting for network before booting
    do_boot_splash 1 # Disable the splash screen
    do_overscan 1 # Enable overscan
    do_camera 0 # Enable the camera
    do_camera 1 # Enable the camera
    do_ssh 0 # Enable remote ssh login
    do_spi 1 # Disable spi bus
    do_memory_split 64 # Set the GPU memory limit to 64MB
    @@ -49,12 +42,19 @@ do_onewire 1 # Disable onewire on GPIO4
    do_audio 0 # Auto select audio output device
    # 1 # Force audio output through 3.5mm analogue jack
    # 2 # Force audio output through HDMI digital interface
    do_hostname rpi-up # Set hostname to 'rpi-up'
    #do_gldriver G1 # Enable Full KMS Opengl Driver - must install deb package first
    # G2 # Enable Fake KMS Opengl Driver - must install deb package first
    # G3 # Disable opengl driver (default)
    #do_rgpio 1 # Enable gpio server - must install deb package first

    # System Configuration
    do_configure_keyboard # Autodetect keyboard
    do_hostname rpi-test # Set hostname to 'rpi-up'
    do_wifi_country AU # Set wifi country as Australia
    do_wifi_ssid_passphrase wifi_name password # Set wlan0 network to join 'wifi_name' network using 'password'
    do_change_timezone Australia/Brisbane # Change timezone to Brisbane Australia
    do_change_locale en_AU.UTF-8 # Set language to Australian English

    #Don't add any raspi-config configuration options after 'END' line below & don't remove 'END' line
    END

  5. @damoclark damoclark revised this gist Jan 20, 2019. No changes.
  6. @damoclark damoclark created this gist Jan 20, 2019.
    74 changes: 74 additions & 0 deletions raspi-config.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,74 @@
    #/bin/sh
    #
    # Don't change the following lines unless you know what you are doing
    # They execute the config options starting with 'do_' below
    grep -E -v -e '^\s*#' -e '^\s*$' <<END | \
    sed -e 's/$//' -e 's/^\s*/\/usr\/bin\/raspi-config nonint /' | bash -x -
    #
    ############# INSTRUCTIONS ###########
    #
    # Change following options starting with 'do_' to suit your configuration
    #
    # Anything after a has '#' is ignored and used for comments
    #
    # If on Windows, edit using Notepad++ or another editor that can save the file
    # using UNIX-style line endings
    #
    # macOS and GNU/Linux use UNIX-style line endings - use whatever editor you like
    #
    # Then drop the file into the boot partition of your SD card
    #
    # After booting the Raspberry Pi, login as user 'pi' and run following command:
    #
    # sudo /boot/raspi-config.txt
    #
    ############# EDIT raspi-config SETTINGS BELOW ###########

    # System Configuration
    do_configure_keyboard # Autodetect keyboard
    do_wifi_country AU # Set wifi country as Australia
    do_wifi_ssid_passphrase wifi_name password # Set wlan0 network to join 'wifi_name' network using 'password'
    do_change_locale en_AU.UTF-8 # Set language to Australian English
    do_change_timezone Australia/Brisbane # Change timezone to Brisbane Australia

    # Hardware Configuration
    do_boot_wait 0 # Turn on waiting for network before booting
    do_boot_splash 1 # Disable the splash screen
    do_overscan 1 # Enable overscan
    do_camera 0 # Enable the camera
    do_ssh 0 # Enable remote ssh login
    do_spi 1 # Disable spi bus
    do_memory_split 64 # Set the GPU memory limit to 64MB
    do_i2c 1 # Disable the i2c bus
    do_serial 1 # Disable the RS232 serial bus
    do_boot_behaviour B1 # Boot to CLI & require login
    # B2 # Boot to CLI & auto login as pi user
    # B3 # Boot to Graphical & require login
    # B4 # Boot to Graphical & auto login as pi user
    do_onewire 1 # Disable onewire on GPIO4
    do_audio 0 # Auto select audio output device
    # 1 # Force audio output through 3.5mm analogue jack
    # 2 # Force audio output through HDMI digital interface
    do_hostname rpi-up # Set hostname to 'rpi-up'
    #do_gldriver G1 # Enable Full KMS Opengl Driver - must install deb package first
    # G2 # Enable Fake KMS Opengl Driver - must install deb package first
    # G3 # Disable opengl driver (default)
    #do_rgpio 1 # Enable gpio server - must install deb package first

    #Don't add any raspi-config configuration options after 'END' line below & don't remove 'END' line
    END

    ############# CUSTOM COMMANDS ###########
    # You may add your own custom GNU/Linux commands below this line
    # These commands will execute as the root user

    # Some examples - uncomment by removing '#' in front to test/experiment

    #/usr/bin/raspi-config do_wifi_ssid_passphrase # Interactively configure the wifi network

    #/usr/bin/aptitude update # Update the software package information
    #/usr/bin/aptitude upgrade # Upgrade installed software to the latest versions

    #/usr/bin/raspi-config do_change_pass # Interactively set password for your login

    #/sbin/shutdown -r now # Reboot after all changes above complete