The Cookie Machine - Click here to drag window

DUMMY TEXT - Real text set in assets/js/theCookieMachine.js

If you can read me, I'm broken!

Views: 20,955     Votes:  6 
Tags: configuration   text-editor   editing  
Link: 🔍 See Original Answer on Ask Ubuntu ⧉ 🔗

URL: https://askubuntu.com/q/1160748
Title: How do I edit configuration files?
ID: /2019/07/24/How-do-I-edit-configuration-files_
Created: July 24, 2019    Edited:  August 24, 2019
Upload: September 15, 2024    Layout:  post
TOC: false    Navigation:  false    Copy to clipboard:  false


Configuration files are usually owned by root. For example:

$ ll /etc/default/grub

-rw-r--r-- 1 root root 6801 Jul 18 13:26 /etc/default/grub

 ^^ ^  ^
 || |  +-- Users can only read
 || +----- Members of the group can only read
 |+------- The owner can write
 +-------- The owner can read

In order for a user (yourself) to edit /etc/grub/default you need to use sudo powers. So instead of using:

gedit /etc/default/grub

You must use:

sudo -H gedit /etc/default/grub

At which point you will be prompted for your password.

Note: Related question today: Grub file can't be saved after modification

⇧ How to find `.desktop` file location for a particular application Grub file can't be saved after modification  ⇩