this post was submitted on 05 Dec 2023
946 points (98.1% liked)

linuxmemes

20880 readers
6 users here now

I use Arch btw


Sister communities:

Community rules

  1. Follow the site-wide rules and code of conduct
  2. Be civil
  3. Post Linux-related content
  4. No recent reposts

Please report posts and comments that break these rules!

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 25 points 11 months ago (30 children)
[–] [email protected] 23 points 11 months ago (29 children)

You shouldn't really use editor with sudo, but instead use sudoedit to edit files restricted to root user

SUDO_EDITOR=nano sudoedit /etc/fstab

This accomplishes the same function while running the text editor as unprivileged user

[–] [email protected] 7 points 11 months ago (7 children)

Alternatively you could use my favorite approach, Visual Studio Code. Just open the file with it, edit it and upon saving you will be promoted if the file needs admin rights to save.

[–] [email protected] 7 points 11 months ago* (last edited 11 months ago) (1 children)

Okay but how can I show how good I am with shortcuts to edit legacy software ?

[–] [email protected] 2 points 11 months ago

Vscode does have a lot of shortcuts, so you could always study them in detail and impress others that way. 😅

load more comments (5 replies)
load more comments (26 replies)
load more comments (26 replies)