Score:0

Terminal doesn't require sudo for things it should

gb flag

I have a new Lenovo system with Ubuntu 20.04 pre-installed. So far, I have only created the administrator account. In setting up the machine, I've had to do a few operations with the Terminal. It does not require me to use sudo. It just accepts the bare command. I've never seen this happen in any previous distro, and it makes me nervous--am I operating as root without meaning to?

My command prompt in Terminal is a dollar sign ($), NOT an octothorpe (#).

chili555 avatar
cn flag
Please give us an example. One *should* be able to do: `ip addr show` without sudo but one should *not* be able to do `apt update` without sudo. What command(s) is/are troublesome? Welcome to Ask Ubuntu.
Holly avatar
gb flag
Thank you, this is reassuring! 'apt update' does indeed require sudo. I must just not have used a restricted command previously. (Distros I've used in the past required sudo for _every_ command, regardless.) How do I mark this solved?
chili555 avatar
cn flag
I will convert my comment into an asnwer that you may accept. Heaven knows, I really crave the points.
vanadium avatar
cn flag
You can delete your question, which is the best in this case as this will not help other users.
Score:0
cn flag

In Ubuntu, and a great many other Linux distributions, users alone, without the use of sudo may make routine inquiries, for example:

ip addr show

These inquiries only tell us some non-priveledged details but they do not allow us to change anything.

On the other hand, if we wish to change something system-wide, for instance, install new software:

sudo apt install abcde

Then sudo is required. Also, in many cases, to even read some system files, sudo is required.

cat /etc/NetworkManager/system-connections/myrouter.nmconnection 
cat: /etc/NetworkManager/system-connections/myrouter.nmconnection: Permission denied

Of course, we may change anything in our /home/user directories without sudo:

rm /home/user/Photos/mycat.jpg

The behavior you've descibed, that some but not all commands require sudo, is normal in Ubuntu.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.