We have tried to organize this FAQ, but it didn't work. (It sort of makes
sense if you read it through, however.) To speed up the process for those
who know what they're looking for, a table of contents follows. Again,
newcomers to UNIX should read this entire document - it is very helpful.
-
Read the.. eh, fine manual.
-
The manpages are a large "online manual" found in almost all Unixes.
Manpages can be referenced by either command or topic. If you want
instructions on the use of a certain command (for example, chmod), type
man chmod. If you are unsure about specific commands, but have
a general topic you want to search for (for example, permission) type
man -k permissions.
-
UNIX is a true preemptive multitasking operating system, unlike any
other. It is the most portable operating system, unlike ones such as
MS-DOS and Mac's Finder that only run on certain machines. UNIX runs on
doorstops (8088's, 286's, Altos) to personal computers (IBMs, Apple (GS &
Macs), Amigas, 3b1, Atari ST) to workstations (Suns, SGI's, NeXTs,
HP's, Dec's), to supercomputers (Crays, Thinking Machines), and many more.
It's quite efficient, and crashes very infrequently.
UNIX is also a multiuser operating system, unlike others. This means that
more than one user can use the same computer (programs, filesystem, memory,
CPU) by logging in off of different ports (serial, ethernet, Internet, etc.)
-
No, UNIX is not an acronym. Unix is a "play on words" of an older
multiuser time-sharing OS known as Multics. UNIX was also originally
designed as a single user environment (hence "U"nix).
-
There are several UNIX-clones for IBM's.
FreeBSD (ftp.freebsd.org),
NetBSD (www.netbsd.org),
BSD/OS (www.bsdi.com), and
Linux (sunsite.unc.edu)
are several. All but BSD/OS are freeware.
If you've got a mac, check out
NetBSD (www.netbsd.com),
MachTen, and A/UX. NetBSD is the only free one.
-
FreeBSD is based on the standard BSD source trees, and is regarded as the
most UNIX-like Unix. It is a very classical environment. If you are used
to Unix, and do Unix programming (especially network programming), this is
the OS for you. NetBSD is not as popular as FreeBSD, but is still an option.
It is a little bigger than FreeBSD and a bit slower. Linux is very popular
UNIX-like clone as well, but it has no ties with any other Unix - hence, it
deserves its own category, and channel. And remember, if you go for Linux,
you have to decide *which* linux to go for - there are at least 7 different
distributions - some of which are very different. And then, when a hole is
discovered, you have to find patches that work with your obscure distribution
and version. FreeBSD has controlled releases, and is developed in a
controlled, structured manner; all security-related changes to the system
must undergo peer review before a commit is made.
In brief, take linux questions to #linux. And FreeBSD/NetBSD would be
a better choice for complete BSD/UNIX compatibility.
-
Typing uname -a will give you a result much like these:
- SunOS outer 4.1.3_U1 4 sun4c
- IRIX hyperlinks 5.3 11091812 IP22 mips
- Linux slugbox 1.2.7 #1 Tue Jul 4 11:05:37 PDT 1995 i386
These people are running SunOS (Sun), IRIX (SGI), and Linux (x86)
respectively. Look at the first and third fields of this output will tell
you your OS type and kernel version.
-
There are many good books on learning almost every aspect of the UNIX
operating system in its many forms. Other books cover individual utilities
used in Unix. It is the author's opinion that books published by O'Reilley
and Associates (ORA) are by far the most comprehensive and easy to
understand.
-
IRCing as root is a bad idea. Even being root in the first place is a
bad idea. Unix has multiuser capabilities - use them for god sakes! You
will do much less damage to your system if you accidentally rm -rf / as a
user than you will do as root. As for IRC'ing as root, certain scripts and/or
IRC clients can have bugs or "trojan horses" that can cause damage to your
computer, or undermine your computer's security. Even if you are certain
there are no holes in your client, it is a matter of principle that we
protect you from yourself. Thus, if you IRC as root, and join #unix, you
will be kicked, if root is not already banned. Several IRC servers have
already made it impossible for a root to join their server in the first
place.
-
- for .Z files, use uncompress file.Z.
- for .gz files, use gunzip file.gz or gzip -d file.gz.
- for .lzh files, use lharc x file.lzh.
- for .zip files, use unzip file.zip.
Note that some systems may not have lharc or unzip.
-
"tar" is a archiving utility, which means they have several files in them.
To see what's in the tar, use tar tf file.tar. To extract the
files from the .tar, use tar xf file.tar.
To make a tarfile, tar cf tarfile.tar (files to be tarred).
-
.shar files are basically files stored in a shell script. First load the
script into your editor and make sure the first line says "#! /bin/sh". If
not, delete lines until it does say that. Then save and sh file.shar
and the files will be dumped into the directory you are in.
-
Although bots run under UNIX, we don't do bots. If you don't know
how to set up a bot, or compile a bot, you shouldn't be running one in the
first place. Also, programs such as flash, nuke, etc only escalate
hostility on IRC, causing more flames, re-flashing, nuking, etc. They also
cause lag, tension, and heartburn on administrators. Use of these commands
are logged by many systems now, and will only cause you to get your account
removed.
-
Just ask archie. Archie is a huge database of files collected from all
sorts of ftp sites. Some systems have it as a command-line interface, where
you can archie program. It is a good idea to read the manpage
for archie (see above for instructions), as it does vary from system to
system. Some sites don't have the archie program installed, so you have to
use telnet to get to an archie server - telnet ds.internic.net
and log in as archie. There is online help available there for the use
of that archie server.
-
GNU software can be searched for using archie, but since many sites
carry such software, you are advised to go to the "official" (and fastest)
site for GNU software: prep.ai.mit.edu.
-
You may get many X programs right from the source, the X Consortium:
ftp.x.org.
-
The find command is used on the Unix command line for searching your
local filesystem (or those mounted by NFS). Find is a very complex command
with many commandline switches. It is far too complex to be explained fully
here. A simple example and explanation for searching for a file of a certain
name is:
- find / -name 'myfile.txt' -print
The above will search all subdirectories of the root (/) directory for
the file by the name of myfile.txt. All files by that name will be printed.
There are many other things you can do; and wildcard matching is permitted.
See the manpage for more details.
There is also a command, 'where', that will search your PATH string for
a command. You can use this command, such as where chmod to find
the location of the program chmod.
-
Files ending in .c are C programs. They can be compiled using either
cc or gcc. We recommend gcc (the GNU C compiler). However, when you
download source files, you usually get a whole bunch of them at once,
accompanied by a "Makefile". All you have to do is type make
and it will compile the files for you. ALWAYS read the supplied README
file first, if it is there, however.
-
It's as simple as ls. There are many options for ls; see the
manpage.
-
Use chmod. chmod is a complex command, and we suggest
you read the manpage. Here are some starter tips;
- To make your .plan world-readable: chmod a+r .plan
- To make your directory secure: chmod go-rwx $HOME
- To make a directory and its contents read/writable by everyone: chmod -R a+rwX dir
Here is a summary of the octal numbers:
0 = --- 1 = --x 2 = -w- 3 = -wx 4 = r--
5 = r-x 6 = rw- 7 = rwx
1000 - sticky 2000 - sgid 3000 - sgid + sticky
4000 - suid 5000 - suid + sticky 6000 - suid + sgid
7000 - suid + sgid + sticky
-
For files, rm file. For directories, rm -r directory.
If you want everything to be removed without question, use rm -rf.
If the filename starts with -, you can rm ./-file.
-
Change your password with passwd. Note, you must know your old
password, so tough luck for you people with friends who leave the room.
To change the name people see when they finger you, use chfn.
-
Putting information in the .plan file of your home directory causes that
information to be displayed when fingered. Make note, however, that in
most well managed systems your home directory must be executable. Use
the commands chmod 711 $HOME and chmod 644 .plan
for the process to be complete. See the manpage on chmod for more details
of these numbers.
-
The most commonly used mailers (and mail readers) are: mail,
elm, and pine. mail is the standard boring mail reader
and sender. Pine is a very graphical mailer, similar to the pico editor.
Elm is another, less graphical but more powerful, mail reader.
-
The most commonly used editors are: vi, pico,
emacs, and some sites have joe, jove,
and others. vi is the de facto standard editor, and you will find it on
every UNIX. It is complex, albeit powerful. If you ever get stuck in vi,
just remember to ":q!". pico is a graphical editor, and it comes from the
pine mailer. It is very cheesy, and suited towards new users. emacs is
a (over)powerful editor, and it does it ALL - you can edit files, read mail,
play games, and learn how to bake cookies with emacs.
-
The commands fg, bg, and the control sequence control-Z (^Z) are used for
UNIX job control. If you are currently using a program, ^Z will suspend it
and return you to your shell. You can find out what jobs you are running
by typing jobs. To make a program run in the background, type
bg %# where # is the number of the job listed in jobs.
The fg command returns the process to the foreground. This sounds much
more complex than it really is. Read the manpage on your shell (csh, tcsh,
and bash are common) for more info. Also check out the manpages to
kill and ps.
-
A far superior way of controlling jobs is accessible by using a GNU
program called screen. It is a windowing system of sorts;
you can run many "screens" that act as completely separate terminals that
you can switch back and forth with control-A sequences. For more information,
read the manpage on screen.
-
SATAN was originally designed as a tool to diagnose network and host
security problems. It was intended to be used by the system administrator.
Unfortunatly, SATANs honest use has been corrupted, as SATAN can be used
to diagnose problems in other's networks. This can obviously be used as a
hacking tool. The people of #unix condemn hacking (publically, at least.)
To absolve ourselves from liability should this tool be used incorrectly,
#unix people will not answer questions on the aquisition or use of SATAN.
These questions are best left to the documentation that comes with SATAN.
-
If there are any, good luck finding one. We don't have,
and don't want to, maintain a list of public NNTP servers. News is very
expensive to maintain; hence it is usually not given out to just anyone. Ask
your system administrator what NNTP server to access.
-
In the directory you want to do this in, you can do the following:
for i in *; do mv $i `echo $i | tr [A-Z] [a-z]`; done
To recursively go into all subdirs:
find . -exec sh -c '(mv {} `echo {} | tr [A-Z] [a-z]`)' \;
-
Redirection allows a user to redirect the stream of a program's output
Redirection depends on what shell you are using. If you are using sh, or
similar (bash