My account has been created on a LINUX machine. But, I don't know which type of user I am ( root user or normal user) and which type of access I have. Is there any command through which I can check whether I have sudo access or not in a linux machine if I already have an account.
sudo -l to determine what level of capabilities you have assigned within its configuration.
man 8 sudo
-l[l] [command] If no command is specified, the -l (list) option will list the allowed (and forbidden) commands for the invoking user (or the user specified by the -U option) on the current host. If a command is specified and is permitted by the security policy, the fully-qualified path to the command is displayed along with any command line arguments. If command is specified but not allowed, sudo will exit with a status value of 1. If the -l option is specified with an l argument (i.e. -ll), or if -l is specified multiple times, a longer list format is used.
Try the command "id" to see which groups you are in. This will give you an idea about the account you are using.
You can type groups to see you groups
[user@system ~]$ groups users
and you can just try to use sudo and see, wheater you have sudo access or not. You could try it with "ls". If you don't have sudo access you get an error:
[user@system ~]$ sudo ls
To see which groups you are part of try
groups. Whether or not you have access to
sudo depends on your local configuration.
If when running
groups you don't see
staff or a group specifically set up fir
sudo access then you likely haven't been automatically granted
sudo-ing rights. Note that those can be added via the
sudo configuration as well.