Is there a way to know whether am the administrator of my Ubuntu 14.04 ? If not, how can I became the administrator ?
-
Note that though you keep saying "the administrator", all the answers have spoken of whether or not you are "an administrator". There isn't necessarily a sole administrator (unless you perhaps count the root account, which is normally disabled). You can very well have a hundred administrators on a machine. – Jon Hanna May 29 '14 at 23:10
3 Answers
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.

- 60,593
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)

- 83,767
-
-
-
-
-
-
1@nux Being an administrator means having the right to run programs as root. It doesn't mean using the root account all the time. – Gilles 'SO- stop being evil' May 29 '14 at 16:04
-
all users other than root are standard users , standard users are both users can have some root privileges and some not – nux May 29 '14 at 16:05
-
@nux ...standard user with administrator priveleges = administrator, not root. – Jacob Vlijm May 29 '14 at 16:07
-
-
but what am talking OP means he want to know if he is root or not , this title come from a windows user :) – nux May 29 '14 at 16:10
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 .

- 38,017
- 35
- 118
- 131
-
What you mean by this - "id - u (yourusername) " ? will you explain it a little ? – TomJ May 29 '14 at 15:40
-
-
-
2@Tom Even if you are an administrator, your prompt will normally show
$
. The prompt only shows#
if the shell is running as root. If you merely have the right to run programs as root (which is the definition of being an administrator), that doesn't affect your prompt. – Gilles 'SO- stop being evil' May 29 '14 at 16:03 -
-