Login as root [SOLVED]

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
cgiefer
Level 1
Level 1
Posts: 36
Joined: Tue Apr 26, 2016 12:24 pm

Login as root [SOLVED]

Post by cgiefer »

I realize this is a really stupid question, but how does one login as root in a terminal? I tried "su - root" and "su -l root" and entered my password, but it just comes back with Authentication failure. Something I'm unaccustomed to with Linux Mint is using my own password when it prompts for a root password, such as bringing up Synaptic. At no point have I ever been prompted to create a separate root password, so I do find that confusing after using PCLOS for so many years.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
kc1di
Level 18
Level 18
Posts: 8180
Joined: Mon Sep 08, 2008 8:44 pm
Location: Maine USA

Re: Login as root

Post by kc1di »

Hello cgiefer,
Mint uses sudo instead of su to gain root privileges. so the syntax would be

Code: Select all

sudo <nameofprogram or file you need access to.>
one of the differences in between the two is that with sudo privilege is only give temporarily and it reverses to standard user when program is finished.
For instance say you wanted to elevate privilege to install a program

Code: Select all

sudo apt install <package name>
Note: you should use gksu or gksudo if your running a program already installed such as

Code: Select all

gksu xed
Hope this helps.
Last edited by kc1di on Wed Feb 21, 2018 12:21 pm, edited 2 times in total.
Easy tips : https://easylinuxtipsproject.blogspot.com/ Pjotr's Great Linux projects page.
Linux Mint Installation Guide: http://linuxmint-installation-guide.rea ... en/latest/
Registered Linux User #462608
cgiefer
Level 1
Level 1
Posts: 36
Joined: Tue Apr 26, 2016 12:24 pm

Re: Login as root

Post by cgiefer »

Yes, it definitely helps! Thank you, kc1di, much appreciated. I didn't realize how sudo was used, but now I get it.
rene
Level 20
Level 20
Posts: 12212
Joined: Sun Mar 27, 2016 6:58 pm

Re: Login as root [SOLVED]

Post by rene »

Also note though that of course a shell is one of the programs you can open with elevated privileges: sudo -i will get you a root shell.
User avatar
Moem
Level 22
Level 22
Posts: 16235
Joined: Tue Nov 17, 2015 9:14 am
Location: The Netherlands
Contact:

Re: Login as root

Post by Moem »

kc1di wrote: Wed Feb 21, 2018 10:00 am Note: you should use gksu or gksudo if your running a program already installed such as

Code: Select all

gksu xed
Close but no cigar. You should always use gksu or gksudo if you are running a program with a graphical GUI, such as

Code: Select all

gksu xed
Using sudo or su for graphical programs can and will result in problems with permissions.
Image

If your issue is solved, kindly indicate that by editing the first post in the topic, and adding [SOLVED] to the title. Thanks!
User avatar
kc1di
Level 18
Level 18
Posts: 8180
Joined: Mon Sep 08, 2008 8:44 pm
Location: Maine USA

Re: Login as root [SOLVED]

Post by kc1di »

Thanks for the clarification Moem :)
Easy tips : https://easylinuxtipsproject.blogspot.com/ Pjotr's Great Linux projects page.
Linux Mint Installation Guide: http://linuxmint-installation-guide.rea ... en/latest/
Registered Linux User #462608
User avatar
Moem
Level 22
Level 22
Posts: 16235
Joined: Tue Nov 17, 2015 9:14 am
Location: The Netherlands
Contact:

Re: Login as root [SOLVED]

Post by Moem »

kc1di, you're welcome! The more you know, right? :D
Image

If your issue is solved, kindly indicate that by editing the first post in the topic, and adding [SOLVED] to the title. Thanks!
Locked

Return to “Software & Applications”