Tag Archives: Ubuntu 10.04

Ubuntu 10.04 Linux Commands Cheat Sheet


  • sudo apt-get install unzip
  • unzip [file]


  • tar -cvvf foo.tar [directory]
  •  tar -zcvf {new file name}.tar.gz {directory to compress}


  • tar -zxvf yourfile.tar
  • tar -xvfz filename.tar.gz
  • tar -xvzf filename.tar.gz [directory]
  • tar -jxvf filename.tar.bz2

Find: find [dir] -type d|f -iname ‘searchstring’

  • find / -type -d -iname ‘python’
  • find ~ -type d -exec chmod +x {} ;

Delete a user account

  • sudo deluser <username>

Add an New user

  • sudo useradd <username>


  • sudo useradd -d /home/<directory> -m <username>

( -d specifies home directory, -m makes the folder if it doesn’t exist )

useradd doesn’t add password unless you add -p     …. or you can just set the password later with:

  • sudo passwd <username>

If called with two non-option arguments (see below), adduser will add an existing user to an existing group.

Add an existing user to an existing group

  • sudo usermod -a -G <group> <user>

Set password of new user

  • sudo passwd <username>

Make a new Group: 

  • groupadd <groupname>

To see what groups currently exist:

  • cat /etc/group

To see current users logged in:

  • w

Count lines in file:

  • wc -l <filename>


Installing NGiNX on Ubuntu 10.04 Lucid Lynx

Add the following urls to your sources.list file:

Close and save the file.  Then run the following commands:

That simple.  Next comes Configuring NGiNX.

Editing Ubuntu sources.list

The sources.list is a text file on a Debian derived Linux distributions.  Aptitude (apt-get) uses this list of servers as locations from which to retrieve software. To add to this you must be logged into a terminal.  Have ready and know how to use a simple terminal text editor such as nano or vi. Open the sources.list file in your text editor.  I prefer nano text editor so the command will look like:

sudo nano /etc/apt/sources.list

You must sudo this command unless you’re already switched to the super user account via: ‘sudo -s’.  Now add or delete any lines you need to, then save.  The next apt-get command you run will now pull from these servers.