Page 1 of 1

config.txt file

Posted: Fri Mar 03, 2017 9:51 am
by RDS
I need to change a setting in the config.txt file within /boot but I get the following error message

Code: Select all

Can't open file to write
I have have overcome this in the past by copying the file using the Terminal window.
That seemed a very long way round.
Is there an easier way of getting permission?

Re: config.txt file

Posted: Fri Mar 03, 2017 9:58 am
by hansotten
You have no permsission as user pi to write to system files, for obvious reasons, to prevent accidental damage to the system.

To get access you can elevate your level so admin level with the sudo command temporarely

sudo nano /boot/config.txt

Re: config.txt file

Posted: Fri Mar 03, 2017 10:00 am
by runboy93
Most important thing on linux world, sudo! Remember it always.

Re: config.txt file

Posted: Fri Mar 03, 2017 12:07 pm
by DougieLawson
runboy93 wrote:Most important thing on linux world, sudo! Remember it always.
Use it sparingly.

Too many folks find sudo and run everything with root privileges. When you've run sudo rm -rf / just once you soon learn why sudo should be used sparingly.

Re: config.txt file

Posted: Fri Mar 03, 2017 12:21 pm
by fred44nl
DougieLawson wrote:When you've run sudo rm -rf / just once you soon learn why sudo should be used sparingly.
sounds like "Format C: " :shock:

Re: config.txt file

Posted: Fri Mar 03, 2017 12:24 pm
by mahjongg
fred44nl wrote:
DougieLawson wrote:When you've run sudo rm -rf / just once you soon learn why sudo should be used sparingly.
sounds like "Format C: " :shock:
Yeah, it means remove recursively. It deletes every file on your system.

Re: config.txt file

Posted: Fri Mar 03, 2017 2:05 pm
by RDS
@hansotten
Thank you

and thanks to all for the warnings.
(I just wanted to change the set up so that it always starts in HDMI mode. I have done this on all my Pi's (4 off total to make headless running better)

Re: config.txt file

Posted: Fri Mar 03, 2017 2:47 pm
by W. H. Heydt
mahjongg wrote:
fred44nl wrote:
DougieLawson wrote:When you've run sudo rm -rf / just once you soon learn why sudo should be used sparingly.
sounds like "Format C: " :shock:
Yeah, it means remove recursively. It deletes every file on your system.
On a clear disk, you can seek forever.

Re: config.txt file

Posted: Fri Mar 03, 2017 8:51 pm
by TracyLBaker
mahjongg wrote:
fred44nl wrote:
DougieLawson wrote:When you've run sudo rm -rf / just once you soon learn why sudo should be used sparingly.
sounds like "Format C: " :shock:
Yeah, it means remove recursively. It deletes every file on your system.
rm -rf / means remove recursively (the r part) and forcefully (the f part) -- it all means remove all directories, beginning at the root of the file system (the / part) and don't ask "are you sure?"

The / refers to the root of the file system -- sorta like C: in Windows.