The Cookie Machine - Click here to drag window

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

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

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: November 24, 2022    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  ⇩