Skip to main content

Popularity Report

Total Popularity Score: 0

Loading...
Loading...
Loading...
Loading...
Loading...
Loading...

Rank

Related Lists

Bookmark History

Saved by 3 people (0 private), first by anonymouse user on 2006-07-24


Public Sticky notes

When non-critical data is separated on different partitions, it usually happens following a set pattern:

  • a partition for user programs (/usr)

  • a partition containing the users' personal data (/home)

  • a partition to store temporary data like print- and mail-queues (/var)

  • a partition for third party and extra software (/opt)

Highlighted by djiezes

The only information not included in an inode, is the file name and directory. These are stored in the special directory files. By comparing file names and inode numbers, the system can make up a tree-structure that the user understands. Users can display inode numbers using the -i option to ls. The inodes have their own separate space on the disk.

Highlighted by djiezes

In a file system, a file is represented by an inode, a kind of serial number containing information about the actual data that makes up the file: to whom this file belongs, and where is it located on the hard disk.

Highlighted by djiezes

Table 3-2. Subdirectories of the root directory

DirectoryContent
/binCommon programs, shared by the system, the system administrator and the users.
/bootThe startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.
/devContains references to all the CPU peripheral hardware, which are represented as files with special properties.
/etcMost important system configuration files are in /etc, this directory contains data similar to those in the Control Panel in Windows
/homeHome directories of the common users.
/initrd(on some distributions) Information for booting. Do not remove!
/libLibrary files, includes files for all kinds of programs needed by the system and the users.
/lost+foundEvery partition has a lost+found in its upper directory. Files that were saved during failures are here.
/miscFor miscellaneous purposes.
/mntStandard mount point for external file systems, e.g. a CD-ROM or a digital camera.
/netStandard mount point for entire remote file systems
/optTypically contains extra and third party software.
/procA virtual file system containing information about system resources. More information about the meaning of the files in proc is obtained by entering the command man proc in a terminal window. The file proc.txt discusses the virtual file system in detail.
/rootThe administrative user's home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.
/sbinPrograms for use by the system and the system administrator.
/tmpTemporary space for use by the system, cleaned upon reboot, so don't use this for saving any work!
/usrPrograms, libraries, documentation etc. for all user-related programs.
/varStorage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.

Highlighted by djiezes

For convenience, the Linux file system is usually thought of in a tree structure. On a standard Linux system you will find the layout generally follows the scheme presented below.

Figure 3-1. Linux file system layout

Highlighted by djiezes

On a running system, information about the partitions and their mount points can be displayed using the df command (which stands for disk full or disk free). In Linux, df is the GNU version, and supports the -h or human readable option which greatly improves readability.

Highlighted by djiezes

During system startup, all the partitions are thus mounted, as described in the file /etc/fstab.

Highlighted by djiezes

The kernel is on a separate partition as well in many distributions, because it is the most important file of your system. If this is the case, you will find that you also have a /boot partition, holding your kernel(s) and accompanying data files.

Highlighted by djiezes

Linux generally counts on having twice the amount of physical memory in the form of swap space on the hard disk. When installing a system, you have to know how you are going to do this. An example on a system with 512 MB of RAM:

  • 1st possibility: one swap partition of 1 GB

  • 2nd possibility: two swap partitions of 512 MB

  • 3rd possibility: with two hard disks: 1 partition of 512 MB on each disk.

The last option will give the best results when a lot of I/O is to be expected.

Highlighted by djiezes

One of the goals of having different partitions is to achieve higher data security in case of disaster. By dividing the hard disk in partitions, data can be grouped and separated. When an accident occurs, only the data in the partition that got the hit will be damaged, while the data on the other partitions will most likely survive.

Highlighted by djiezes

In addition to the man pages, you can read the Info pages about a command, using the info command. These usually contain more recent information and are somewhat easier to use.

Highlighted by djiezes

The name of the command and a short description are given, which is used for building an index of the man pages. You can look for any given search string in this index using the apropos command.

Highlighted by djiezes

It is generally considered a bad idea to connect (graphically) using the root

Highlighted by djiezes

GNU programs take long options, preceded by two dashes (--)

Highlighted by djiezes

Some commands have multiple man pages. For instance, the passwd command has a man page in section 1 and another in section 5. By default, the man page with the lowest number is shown. If you want to see another section than the default, specify it after the man command:

man 5 passwd

If you want to see all man pages about a command, one after the other, use the -a to man:

man -a passwd

Highlighted by djiezes

Table 3-1. File types in a long list

SymbolMeaning
-Regular file
dDirectory
lLink
cSpecial file
sSocket
pNamed pipe
bBlock device

Highlighted by djiezes

Introduction to Linux

A Hands on Guide

Highlighted by djiezes

2. Quickstart

Highlighted by djiezes

4. Processes

Highlighted by djiezes

5. I/O redirection

Highlighted by djiezes

7. Home sweet /home

Highlighted by djiezes

10. Networking

Highlighted by djiezes

11. Sound and Video

Highlighted by djiezes

C. Shell Features

Highlighted by djiezes

The file /etc/shells gives an overview of known shells

Highlighted by djiezes

most configuration files are stored in the /etc directory. Content can be viewed using the cat command, which sends text files to the standard output (usually your monitor)

Highlighted by djiezes

bashrc The system-wide configuration file for the Bourne Again SHell. Defines functions and aliases for all users.

Highlighted by djiezes

crontab and the cron.* directories Configuration of tasks that need to be executed periodically - backups, updates of the system databases, cleaning of the system, rotating logs etc.

Highlighted by djiezes

default Default options for certain commands, such as useradd.

Highlighted by djiezes

fstab Lists partitions and their mount points.

Highlighted by djiezes

hosts A list of machines that can be contacted using the network, but without the need for a domain name service. This has nothing to do with the system's network configuration, which is done in /etc/sysconfig.

Highlighted by djiezes

inittab Information for booting: mode, number of text consoles etc.

Highlighted by djiezes

logrotate.* Rotation of the logs, a system preventing the collection of huge amounts of log files.

Highlighted by djiezes

profile System wide configuration of the shell environment: variables, default properties of new files, limitation of resources etc.

Highlighted by djiezes

services Connections accepted by this machine (open ports).

Highlighted by djiezes

In the /var directory we find a set of directories for storing specific non-constant data (as opposed to the ls program or the system configuration files, which change relatively infrequently or never at all). All files that change frequently, such as log files, mailboxes, lock files, spoolers etc. are kept in a subdirectory of /var.

Highlighted by djiezes

As a security measure these files are usually kept in separate parts from the main system files, so we can keep a close eye on them and set stricter permissions where necessary. A lot of these files also need more permissions than usual, like /var/tmp, which needs to be writable for everyone. A lot of user activity might be expected here,

Highlighted by djiezes

The default location of all logs is /var/log

Highlighted by djiezes

Color-ls default color scheme

ColorFile type
bluedirectories
redcompressed archives
whitetext files
pinkimages
cyanlinks
yellowdevices
greenexecutables
flashing redbroken links

Highlighted by djiezes