Ubuntu Linux Terminal Commands Cheat Sheet

Ubuntu Linux Terminal Commands Cheat Sheet

March 16, 2013
Linux

Add New User

adduser

Add New Group

groupadd devs

Add user to a suplimentary group

usermod -a -G admin alex

See user groups

groups

Change Group Ownership for a directory

sudo chgrp -R devs tomcat

Change Time Zone

sudo dpkg-reconfigure tzdata

Select ETC -> Greenwitch

Change hostname

sudo vim /etc/hostname

rename and restart

Restart computer

sudo shutdown -r now

Adding Google DNS to Ubuntu via Terminal

sudo vim /etc/resolv.conf

Add line:

nameserver 8.8.8.8

Restart Network Manager:

sudo service network-manager restart

Renaming Ubuntu Machine

  1. Edit /etc/hostname
  2. Edit /etc/hosts
  3. restart