Linux Class Midterm

You can download the exam without answers as a LaTeX file. Here is the exam with some of the possible answers. The number in parenthesis is the number of people who gave acceptable answers. As these questions were taken from things covered this semester, more detailed answers to some of the questions can be found in the weekly outline. If you missed a lot of questions, you really should look there.

Give the URLs of two websites to go to for Linux help and documentation.,, (9)

Who is the creator of Linux and when was it created? What is the name of the linux penguin?
Linus Torvalds, 1991, Tux (5)

Name three Linux distributions.
Debian GNU/Linux, Red Hat, Slackware, SuSE, Caldera, TurboLinux, Mandrake (7)

What does it mean for software to be ``free'' or ``open source''?
Free as in speech, open as in the source must be accessible, the program can be modified and freely redistributed (12)

What are some ways in which Linux and Windows differ?
linux is open source, based on unix kernel architecture, multiuser server OS, more command line based, etc (9)

What is a program you can use to partition your hard drive?
fdisk, mac-fdisk, cfdisk, partition magic (9)

What is a swap partition?
a partition set aside to act as virtual memory (8)

What is lilo, and what is its primary configuration file?
the linux loader, used to boot linux, /etc/lilo.conf (8)

Name two useful commands to get help on another command.
info, man, apropos, --help, zless /usr/doc/*/* (9)

Give the name of the command to do the following in Linux:
list the contents of a directory --- ls (10)
change to another directory --- cd (9)
copy a file --- cp (7)
delete a file --- rm (6)
display the time --- date (1)
add an account --- useradd, adduser (5)
change a password --- passwd (6)

What does chmod 745 foo do?
changes the permissions of file foo to be readable, writeable, and executable by the owner, readable by the group, and readable and writable by everyone else (except that it doesn't make sense to give the group less permission than everyone) (3)

How could you execute the same command in a different way?
chmod u+rwx g+r o+rx foo (1)

How would you change the owner or group of a file?
chown, chgrp (1)

What do the following commands do: ps --- lists processes (4)
kill --- sends a signal to stop aprocess (4)
grep --- searches a file for a given string (3)

What type of filesystem does Linux use (as in mount -t what)?
ext2 (2)

List four directories found at the root (/) level of Linux and describe what kinds of files are kept there.
/bin binaries or executables, /sbin same but for the system/superuser, /home where user directories are kept, /etc configuration files, /var logs and other various files, /dev device files to access device drivers, /boot, /proc, /floppy, /usr, /root, /tmp, /mnt, /lib (6)

Name two different Linux shells.
bash, ash, csh, sh, ksh, tcsh, zsh (5)

What text editor do you use the most in Linux? How do you save changes and exit in that text editor?
vi, escape-colon-w-q (5)

What are two other text editors?
elvis, vim, emacs, ae, ed, joe, pico, nano, sex (5)

What are three ways to install programs? Explain how they work.
dpkg, dselect, apt-get, capt, rpm, make (6)

Give the syntax you might use to install a package named ``fred'' and the syntax you might use to remove it.
apt-get install fred, dpkg --install fred (4)

How could you find out if you had the package ``barney'' installed?
dpkg -l barney (2)

What file contains the list of sites to check for debian packages?
/etc/apt/sources.list (0)

Name a Debian package we needed to install X in class.
xfree86-common, xserver-common, xfonts-base (3)

What command might you use to configure X?
XF86Setup, xf86config, vi /etc/X11/XF86SConfig (5)

What device is needed for a PS/2 mouse?
/dev/psaux (2)

Name three desktop or window managers.
gnome, kde, afterstep, blackbox, fvwm, sawfish, wm (5)

Name two word processing applications and two games available for Linux.
word perfect, star office, abiword, gedit, nethack, xmines, xbill, quake (8)

What is vmware?
a virtual machine that allows you to run Windows on top of Linux or vice versa (6)

What is a kernel?
Linux, the core of the operating system that is loaded into RAM and deals with hardware access, the seed of corn (10)

What are modules?
additional code that can be dynamically added to and removed from the kernel (5)

What programming language is the Linux kernel written in? What programming language is the Windows kernel written in?
C; a mixture of C++, C, and assembly I think, but it's not like I've read the code (7)

What is the fundamental difference between a 2.2.x and a 2.3.x kernel?
kernels with even minor numbers are stable while odd-numbered kernels are for testing (4)

What is a two-word command that you could execute to configure your kernel?
make config, make menuconfig, make xconfig (1)

What command must you run after installing your new kernel so that the system knows to boot from it?
lilo, mkofboot (3)

How do you make a boot disk?
mkboot, dd (5)

What is the name of the first ethernet device in Linux?
eth0 (4)

What does TCP/IP stand for?
Transmission Control Protocol / Internet Protocol (6)

How many hosts are in a class C network?
roughly 256 (1)

What is an IP address?
a 32-bit address assigned to a network device so it can communicate with other computers (6)

What is a subnet mask?
a mask which tells you which part of an IP address is the host part and which is the network part (i.e., (3)

What is a gateway?
a computer which is on two networks and routes between them (5)

What is DNS?
Domain Name Service, distributed system to translate IP addresses to full qualified domain names like (5)

What does the command netstat -rn do?
displays the IP routing table numerically (2)

What file contains the addresses of your DNS servers?
/etc/resolv.conf (1)

When is the last time you upgraded all of your Debian packages?
Why just yesterday. It's easy using 'apt-get update; apt-get upgrade' (4)