You are on page 1of 3

Linux Commands and Files System

Description
1. Commands
1.1 Synopsis
Command input -o [input] –options [input]

Section Meaning
[THING] Thing is optional
<THING> Thing is required
THING... Thing can be repeated limitless
THING1 | THING2 Use 1 or 2. not both
THING Replace thing with whatever

1.2 Manual Page structure


Section Contains Description
1 User commands Commands that can be run from the shell by a
normal user (typically no administrative
privileges are needed)
2 System calls Programming functions used to make calls to
the Linux kernel
3 C library functions Programming functions that provide interfaces
to specific programming libraries.
4 Devices and special files File system nodes that represent hardware
devices or software devices.
5 File format and conventions The structure and format of file types or
specific configuration files.
6 Games Games available on the system
7 Miscellaneous Overviews of miscellaneous topics such as
protocols, filesystems and so on.
8 System daemons and administration tools Commands that require root or other
administrative privileges to use

Note: Sections 1, 5, 8 are what you will likely use most often.

1.2.1 Usage
man section_number command
1.3 Data Streams
1.3.1 Standard Data Stream
 Standard input (# 0)
 Standard output (# 1)
 Standard error (# 2)
These number are used when telling commands to do stuff with given input, output or error.
For example: cat 1> file.txt (efficient way: cat > file.txt)
 input > output
 input >> appended_output
 output < input
 something complex? (Output1 < input1)input2 > output2final
◦ eg: cat < input.txt > /dev/pts/n
where n is 0,12,3….. for multiple terminal instances at a time and /dev/pts/n is the terminal
(everything in Linux is file)

1.3.2 Non Data Streams Input


 Command line arguments//
File System
# Directory Description
1 / Root. Hold everything else.
2 /bin Stores common user command binaries.
3 /boot Stores bootable Linux Kernel and bootloader configuration files.
4 /dev Files representing devices. tty > terminal, fd > floppy disks, hd
or sd > hard disks, ram > RAM, cd > CD ROM
5 /etc Administrative configuration files. Format for many can be found in
section 5 of manual page.
6 /home Stores home directories for regular user.
7 /media Stores and mount files representing the removable media.
8 /bin Stores libraries shared by the applications in /bin and /sbin to boot the
system.
9 /mnt Same as and superseded by /media.
10 /misc Directory sometimes used to automate filesystems.
11 /opt Stores additional (optional) software.
12 /proc Information about system resources.
13 /root Home for the superuser.
14 /sbin Stores superuser command binaries.
15 /tmp Contains temporary files used by running applications.
16 /usr Contains files pertaining to users that in theory don’t change after
installation.
17 /var Contains directories of variable data that could be used by various
applications. System log files are usually here.

You might also like