The Linux Directories
Oct0
The root (/) directory
The root directory begins with the / symbol
The /bin directory
This directory stores system binaries or programs used to oeprate the system. Non-critical programs or binaries are stored in the /usr/bin directory.
The /boot directory
This directory holds all the files needed to boot the system, except the configuration files. Files included are the kernal, boot loaders, and message files defining the text printed on the loading screen.
The /dev directory
This directory stores all devices used to access different hardware components in the system. Some devices are disk drives, floppy disks, tap drives, terminals, console, serial ports, parallel ports, and sound card.
To view devices currently connected on your computer
cd /dev
ls -lk
The /etc directory
This directory contains a variety of system configurations files needed for system initilization. All users can read files in this directory but only administrators can execute the files.
The /home directory
The /home directory is to store user’s home directory. The root’s home directory is located inside /root instead.
The /lib directory
This directory stores shared libraries allowing Linux’s executables to have smaller file size and denser features without the need of recompiling.
The /mnt directory
This directory to store references to external file systems or devices.
The /opt directory
This directory is a holdover from Unix where /opt hosts additional or add-on software.
The /proc directory
This directory hold dynamic information generated from related system processes such as the kernal, network devices, etc…Each process is a folder with permission to access the process environment. Use ls -l to view long listing type of this folder.
ls -l
The /root directory
Not to be confused with the / directory, the /root directory is the home directory for root user.
The /sbin directory
This directory contains executables that can only be run by the root users. Many of these executables are essential for booting up the system.
The /tmp directory
This folder is used to store temporary files that lasts only a short period of time. This is an efficient way to manage files since most of these temporary files get deleted after a restart of the system or after a termination of a program.
The /usr directory
This directory is enormous that comes with a directory structure of its own.
The /usr/bin directory stores non-critical system executable files, even most of them are launched on a basis.
The /usr/dict directory stores spell checking command files.
The /usr/etc directory used to store configuration files but now no longer used for that purpose.
The /usr/games directory does not have to hold third party games but can be used for that purpose.
The /usr/include and /usr/lib are used to store the C compiler’s include and library files.
The /usr/sbin directory does not store critical system administration file.
The /var directory
Usually user mailboxes, system log files, and spool logs are stored in this directory.
lock – lock files for system processes
log – log files for login/logout, current users, syslog, httpd, ftpd, mail, and spool file.
run – files created for the current system run level.
spool – data that has been spooled for processing, such as print jobs.
state – system state variables.
Linux – setserial command
Oct0
Serial ports on Linux are named ttyS followed by a number corresponding to the actual DOS COM port. For example
ttyS0 –> COM1
ttyS1 –> COM2
ttyS2 –> COM3
ttyS3 –> …you get the idea
The /dev directory holds information essential to operating these ports. setserial lists and configure the serial port configurations. To list all the serial ports, type
ls /dev/ttys*
setserial -g /dev/ttyS* prints out the configuration information for each serial port
Linux – date command
Oct0
To change the date and time, type su, enter your password, then become root. Or sudo if you have a different setup.
You must adhere to the following format when setting date and time
MMDDhhmmCCYY.ss
MM 2 digits month
DD 2 digits day of the month
hh 2 digits hour in 24-hour clock format
mm 2 digits minute
CC 2 digits century
YY 2 digits year
ss 2 digit seconds
For example: change the date and time to October 10 2008, 11:34:35 EDT

















