System Administration

Execute command as an administrator (can be destructive/insecure. Use only for system administration tasks):
sudo command

Become system administrator:
sudo -s

Quit system administration:
exit

Forgot to type sudo in front of a command and already hit enter? Repeat the last command using sudo:
sudo !!

Change privileges over file or directory (see man page for details.)
sudo chmod

Create a new user:
sudo adduser

Change user privileges (be very careful with this one):
sudo usermod

Delete user
sudo deluser

Print groups to which current user belongs:
groups

Create a new group:
sudo groupadd

Change group privileges:
groupmod

Delete group:
delgroup

Temporarily become a different user:
su username

Print usernames of logged in users:
users

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: