Rose-Hulman Robotics Team

software/linux

Linux Cheat Sheet

Essential commands for using Linux tools in the context of the Robotics Team

These commands are for use with a Linux terminal. Typically, you will be SSH'd into  rhitrobotics.org, the robot, or the camera when using them. (Note that some of these commands will be unavailable on the camera because it is a stripped-down embedded system.)

The Basics

ls [directory]
List the current directory or the one specified in the command. ls -a to include dot-files (the Linux equivalent of Windows's hiden files), `ls -l' to view columns.
cd <directory>
Change the current directory to directory.
man <topic>
Look up a manual page. topic is generally a command, like ls.

Subversion

Also see the Subversion page for a list of our repositories.

svn checkout <url> [outdir]
Check out the repository at url to outdir, or a directory with the name of the last path segment of url if outdir is not specified.
svn commit -m "message"
Check the directory tree starting at the current directory into Subversion. "message" is a brief description of the changes --- it will show up in the Trac timeline.

Installing Software (Package Management)

Note: this doesn't apply to the camera, but only to Ubuntu and other  Debian-derived Linux variants.

sudo aptitude install <package-name>
Install the package <package-name> if it isn't installed. For example, to install the  Pidgin instant-messaging client, run sudo aptitude install pidgin. You can also install multiple packages at once, just list them one after another.
sudo aptitude remove <package-name>
Uninstall the package <package-name>.
aptitude search <query>
Search for packages with <query> in their name or description.

Networking

ifconfig
List current network interfaces, including IP addresses, MAC addresses, etc.
ping <ip-address-or-hostname>
Check for connectivity with a remote machine. E.g., ping google.com to see if you have an Internet connection or ping 192.168.27.3 to see if you can access the Elphel camera.
ssh [username@]<ip-address-or-hostname>
Log into a computer remotely. E.g., ssh rhrt@moxoms-master.acad.rose-hulman.edu to get a remote shell onto the robot, or ssh lug.rose-hulman.edu to login to the  LUG server. The username is optional, and defaults to your current username.

Password management

passwd
Use this command when SSH'd into  rhitrobotics.org to change your password.