Computer
Networking
and
Practical
Security

Fall 2006
course
navigation

Unix help

Fundamental Concepts

The Shell

Whenever you're at the command line, you're using a "shell" to interact with the computer. Shells, as the name suggests, separate users and allow them each their own unique interface. They're also nesting (think Russian dolls, only with lots of space between each doll). I can be logged in as "joedirt, type "su fishpaste" (followed by fishpaste's password), and find myself in a new shell for fishpaste. Any changes I make to fishpaste's shell will not affect joedirt's. Similarly, I can be logged in as "mork" on my machine, then use ssh to log into cs as "mindy". Again, this is a separate shell and won't affect mork's carefully edited .bashrc file.

Permissions and Root

Every file and directory on a unix box has a set of permissions. This set specifies different users' abilities to read, write, and/or execute. The permissions are divided into three categories: owner (each file has a unique user classified as owner), group (which can contain any number of users), and everyone else. This allows the owner to give only the minimum necessary access to other people.
You've probably heard "1337 haxxorz" claim they've "rooted" a box. Each Unix system has "root" account with access to everything. This can be very good or very very bad, depending on the circumstances, and you should be very careful when logged in as root. This is where you can accidentally destroy your filesystem and lose all your data with a single command, or where an attacker can "own the box", changing your passwords, deleting your logs, replacing harmless programs with malicious ones. On the other hand, you'll be able to access all parts of your system and do some pretty cool things, so be careful, not afraid.

Basic Tools

Man pages

Man pages are your friend. All of the standard Unix tools (and most tools you install) will have a man (manual) page. You'll find information on what they do, how (and often advice on when) to use them, what options are available, and occasionally the odd history or math lesson. When all else fails, start here.
http://cs.marlboro.edu/ courses/ fall2006/networking/ wiki/ Unix_help
last modified Monday December 4 2006 12:23 pm EST