User Administration

  1. adduser <username>: Create a new user named <username>
  2. userdel -r <username>: Delete the user named <username>. The -r option removes the user's home folder located at /home/<username>.
  3. lastlog: lists all users and the last time that they logged in.
  4. groupadd <groupname>: Create a group called <groupname>
  5. useradd -G <groupname1>,<groupname2>... <username>: Add a user named <username> to a group or multiple groups.
Permissions
  1. chown <username>:<groupname> <file or directory>: Change the owner of at file or directory to <username> and <groupname>.
  2. chmod <permissions code> <file or directory>: Change the permissions on a file or directory to that specified.
"Hardware" Resources
  1. top: Show the top resource using processes
  2. ps aux: Show all processes
  3. free: Show information about memory allocation
  4. du <file or folder name>: Show the size of a file or folder, recursive for folders.
  5. kill <PID>: Kill a process by its ID. Use kill <PID> -9 to force the kill.
EC2 Tools
  1. ec2-bundle-vol: use to bundle an AMI for your running instance. Use --help for syntax information.
  2. ec2-upload-bundle: use to upload your bundle to Amazon's place for these things. Again, Use --help for syntax information.
Package Management / Software Installation
  1. apt-get: Oh my goodness its so easy to install anything!
  2. dpkg -L <package name>: Show a list of all the files that were installed with the named package. Useful since Linux seems so silly about where everything ends up...

Comments

unable to execute /bin/rm: Argument list too long

wgrunberg's picture

Apparently, there is a limit to how many files the rm command can handle. It chokes on over 6000 files in Ubunto and throws an "unable to execute /bin/rm: Argument list too long" error. Here is work around:

find . -name '*.mef' | xargs rm

or if you need root privileges:

sudo find . -name '*.mef' | sudo xargs rm

Unix/Linux Command Reference

wgrunberg's picture

Here is my current favorite one-page Unix/Linux command reference cheat sheet. They also came out with an Ubuntu reference cheat sheet version. They probably only changed the color scheme to match Ubuntu's ;)