Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8023

Raspberry Pi OS • Re: give me privilege

$
0
0
I prefer sudo -i instead. It achieve the same result, but runs one less process
There is actually a significant difference, as shown in your results. sudo -i or sudo su - start a login shell as root, whereas sudo -s or sudo su start a non-login shell.

A login shell will have its environment reset to the defaults for the root user, and its initial working directory will be /root/. A non-login shell will inherit some of its environment (exactly how much depends on distribution, and sudoers configuration), and its working directory from the unprivileged user.

sudo -i may be safer for beginners, because there is less risk of root ending up owning files in the user's home, but sudo -s is often more convenient.

Statistics: Posted by jojopi — Mon Jun 02, 2025 10:58 pm



Viewing all articles
Browse latest Browse all 8023

Trending Articles