Login as root on linux mint

Linux Mint Forums

Forum rules
There are no such things as «stupid» questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help. Topics in this forum are automatically closed 6 months after creation.

How to log in as «root» in Mint 20?

Post by Fran_3 » Fri Aug 14, 2020 9:30 am

Some online tutorials first say «log in as root»
I have Googled how to do this but the answers are confusing. ranging from. no root anymore, use «su», use «su» then rename the user, etc, etc, etc

So, let me ask it here. if I have my Linux Mint 20 open, I’m logged in as me. and go to the command line. aka. shell, terminal, console, prompt, etc

and an online tutorial instructs me to «log in» as «root» .

1 — should I log out as «me» and log in as «root» and if so how?
2 — just type su at the prompt
3 — or what?

Читайте также:  Изменение формата даты linux

Thanks for helping me clear this up.

Re: How to log in as «root» in Mint 20?

Post by rene » Fri Aug 14, 2020 9:45 am

Login in graphically as root, i.e., from the actual login screen, is something you should not do. Logging in as root on a so-called virtual console (a text console) is generally OK but never mind, since unlikely to be that which whatever you’ve been reading is referring to. From a terminal opened as yourself, just type sudo -i to open a root shell to work from — but note that rather than doing everything as root as you will from that point on in that terminal do, it’s generally best to prefix individual commands with sudo instead.

Re: How to log in as «root» in Mint 20?

Post by Fran_3 » Fri Aug 14, 2020 10:13 am

what is the difference between using «sudo -i» and in using «su» ?

Once I execute «su» how do I later get back to being logged in as me?

Re: How to log in as «root» in Mint 20?

Post by Hoser Rob » Fri Aug 14, 2020 10:43 am

Which tutorials? I’ve been using Linux for a while and have never set a root password. sudo should work.

AndyMH Level 20
Posts: 12132 Joined: Fri Mar 04, 2016 5:23 pm Location: Wiltshire

Re: How to log in as «root» in Mint 20?

Post by AndyMH » Fri Aug 14, 2020 12:46 pm

For starters, the root account is not activated by default and second, you don’t need it, any command that needs admin privileges you prefix with sudo as already said.

Читайте также:  403 Forbidden

If you want to know more about any terminal command then man command , e.g. man sudo

 -i, --login Run the shell specified by the target user's password data‐ base entry as a login shell. This means that login-specific resource files such as .profile or .login will be read by the shell. If a command is specified, it is passed to the shell for execution via the shell's -c option. If no command is specified, an interactive shell is executed. sudo attempts to change to that user's home directory before running the shell. The command is run with an environment similar to the one a user would receive at log in. The Command environment section in the sudoers(5) manual documents how the -i option affects the environment in which a command is run when the sudoers policy is in use
andy@T430 ~ $ sudo -i [sudo] password for andy: root@T430:~# 

Thinkcentre M720Q — LM21.1 cinnamon, 4 x T430 — LM20.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0

Источник

How To Login As Root User In Linux?

How To Login As Root User In Linux?

The root user is the most privileged user in Linux and Unix systems. The root user is equal to the Administrator in Windows. The root user has the right to read, write and execute all files in a Linux system. The root user comes from the Unix systems. The root user also exists in Unix-like operating systems like BSD, AIX, MacOS, Android, etc. The root user is important because some actions can be only accomplished by the root user.

Root Login via Graphical Desktop Environment

Even Linux is mostly command line based operating system it provides different desktop environments for GUI experience. There are different desktop environments like GNOME, KDE, LXDE, XFCE etc. The GUI desktop environment can be used to login as root user. The login manager provides the ability to login as root user. If you are using the GNOME and the login screen looks like below just click to the “Not Listed?” under the user list. The GNOME do not list the root user by default so we will enter the root username manually.

Читайте также:  Join text files linux

We will see the following screen where we can enter the root username. Just type root and press Enter key.

In the following screen the password for root user is provided.

Root Login via Terminal

The terminal is used to login to a Linux system and manages via a command-line interface. The root user can log in via the terminal. In bahs shell or terminal, the su command is used to login as the root user. Even the current user is not root we can use the terminal to log in as a root user.

Root Login via SSH

SSH or Secure Shell is a protocol used to login to systems remotely and manage via command-line interface. The SSH can be used in order to login as a root. The SSH uses ssh command or tools like Putty. The root username is provided before the remote host IP address or hostname. The following ssh command can be used to login as root.

Источник

Оцените статью
Adblock
detector