How to access and edit the config.txt file on Raspberry Pi

This tutorial will show you how to access and adjust the configuration file config.txt on your Raspberry.
For more information see the official Raspberry Pi Documentation.

Note: If you need to adjust the cmdline.txt, you will also find it on the boot partition.

Overview of this article

SD cards 
   How to edit config.txt on Linux
   How to edit config.txt on Windows
eMMC
Troubleshooting

SD cards

How to edit config.txt on Linux

  1. Take the SD card out of your device and insert it into your computer’s card reader.
  2. On Linux the SD card will be listed as two devices.
    1. Main Volume
    2. Boot
  3. Click on Boot.
  4. In here you will find the config.txt file. Open it with your preferred text editor to make changes to the file.
  5. When done, save and click on the Eject button to safely remove the SD card from your computer.
  6. Insert your SD card back into your device.

Note: Reboot your device to apply changes.

How to edit config.txt on Windows

  1. Take the SD card out of your device and insert it into your computer’s card reader.
  2. On Windows the SD card will be listed as two devices, but only Boot will be accessible.
  3. Click on Boot.
  4. In here you will find the config.txt file. Open it with your preferred text editor to make changes to the file.
  5. When done, save and click on the Eject button to safely remove the SD card from your computer.
  6. Insert your SD card back into your device.

Note: Reboot your device to apply changes.

Note: If the boot partition is not mounted by Windows, please see our Troubleshoot section below.

eMMC

If your board has an eMMC and not an SD card, follow the steps below to access and adjust the boot partition.

  1. Install RPIBoot and the required drivers on your PC.
    Download the Windows installer.
  2. Connect the board to your PC through the micro USB slave port.
    For a more detailed explanation, see steps 1 till 7 of our Raspberry Pi Compute Module 4 IO Board tutorial.
  3. Run the RPiboot.exe on your PC.
    Installed in step 1 along with the drivers.
    The eMMC should now appear in Windows as a USB stick.
  4. Access the eMMC that now appears as a USB stick and click on Boot.
  5. In here you will find the config.txt file. Open it with your preferred text editor to make changes to the file.
  6. When done, save and click on the Eject button to safely remove the board from your computer.

Note: Reboot your device to apply changes.

Troubleshooting

Boot partition is not mounted by Windows

If this is the case, you will have to mount it yourself, follow the steps below:

  1. Take the SD card out of your device and insert it into your computer’s card reader.
  2. Open Disk Management.
    For example, by right-clicking on the Start button and then selecting Disk Management.
  3. In Disk Management select and right-click the boot drive.
    windows-boot-no-letter-maked
  4. Select Change Driver Letter and Paths.
    windows-change-path-marked
  5. Click on Add to add the Letter.
    windows-change-path-add-marked
  6. Select the drive letter you want to assign to boot and click OK.
    windows-add-letter-2
  7. Letter has been successfully assigned.
    windows-boot-letter-maked