How to know whether am the administrator of my Ubuntu?

Solution 1:

Simply type id in a terminal. It outputs user id, group id, and group memberships of your account. In my case:

UID=1000(jacob) GID=1000(jacob) groepen=1000(jacob),4(adm),24(cdrom),27(sudo),30

"27(sudo)" means I am member of the group "sudo", and that I have the option to run commands with sudo, in other words: I am an administrator.

In comparison, a "normal" user's output:

UID=1001(testpersoon) GID=1001(testpersoon) groepen=1001(testpersoon),1000(jacob)

To turn a "normal" user into an administrator, add the user to the group sudo:

sudo adduser <username> sudo  (from an administrator's user account)

Solution 2:

In the default GUI, open the System Settings and go to the “User Accounts” tool. This shows your “Account Type”: “Standard” or “Administrator”.

On the command line, run the command id or groups and see whether you are in the sudo group. On Ubuntu, normally, administrators are in the sudo group.

You may have administrative access if you've been directly added to the list of sudoers — this is more likely if the administrator is familiar with Linux or Unix in general and didn't use the default Ubuntu method. Try running sudo echo ok and enter your password; if this prints ok, you're an administrator.

Solution 3:

By default root account is disabled in ubuntu , root account has UID = 0 , try :

id and see what is the output , if its other than zero you are not the root .

But you can check if you can use root privileges by sudo :

sudo -v

If you cant it will state :

Sorry, user [username] may not run sudo on [hostname].

Another tips when you open terminal :

If $ at the end of the prompt that means standard user .

If # that means root user

In my case nux@ubuntu-PC:~$

That means i am a standard user .