This link has been bookmarked by 12 people . It was first bookmarked on 24 Jul 2006, by ROHITHA DASSANAYAKE.
-
05 Sep 14
-
file filename -
Key combinations in Bash
-
Subdirectories of the root directory
-
Most common configuration files
-
Common devices
-
mkdir 1999 2000 2001
-
mkdir -p 2001/reports/Restaurants-Michelin/
-
-
03 Mar 12
-
22 Dec 11
-
08 Apr 08
-
19 Mar 08
-
-
It is generally considered a bad idea to connect (graphically) using the root
-
GNU programs take long options, preceded by two dashes (--)
-
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
-
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.
-
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.
-
Table 3-1. File types in a long list
Symbol Meaning - Regular file d Directory l Link c Special file s Socket p Named pipe b Block device -
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.
-
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.
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:
The last option will give the best results when a lot of I/O is to be expected.
-
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.
-
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.
-
During system startup, all the partitions are thus mounted, as described in the file /etc/fstab.
-
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.
-
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.
-
Table 3-2. Subdirectories of the root directory
Directory Content /bin Common programs, shared by the system, the system administrator and the users. /boot The 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. /dev Contains references to all the CPU peripheral hardware, which are represented as files with special properties. /etc Most important system configuration files are in /etc, this directory contains data similar to those in the Control Panel in Windows /home Home directories of the common users. /initrd (on some distributions) Information for booting. Do not remove! /lib Library files, includes files for all kinds of programs needed by the system and the users. /lost+found Every partition has a lost+found in its upper directory. Files that were saved during failures are here. /misc For miscellaneous purposes. /mnt Standard mount point for external file systems, e.g. a CD-ROM or a digital camera. /net Standard mount point for entire remote file systems /opt Typically contains extra and third party software. /proc A 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. /root The administrative user's home directory. Mind the difference between /, the root directory and /root, the home directory of the root user. /sbin Programs for use by the system and the system administrator. /tmp Temporary space for use by the system, cleaned upon reboot, so don't use this for saving any work! /usr Programs, libraries, documentation etc. for all user-related programs. /var Storage 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. -
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)
When non-critical data is separated on different partitions, it usually happens following a set pattern:
-
2. Quickstart
-
4. Processes
-
10. Networking
-
11. Sound and Video
-
- List of Tables
- 1. Typographic and usage conventions
- 2-1. Quickstart commands
- 2-2. Key combinations in Bash
- 2-3. New commands in chapter 2: Basics
- 3-1. File types in a long list
- 3-2. Subdirectories of the root directory
- 3-3. Most common configuration files
- 3-4. Common devices
- 3-5. Color-ls default color scheme
- 3-6. Default suffix scheme for ls
- 3-7. Access mode codes
- 3-8. User group codes
- 3-9. File protection with chmod
- 3-10. New commands in chapter 3: Files and the file system
- 3-11. File permissions
- 4-1. Controlling processes
- 4-2. Common signals
- 4-3. New commands in chapter 4: Processes
- 5-1. New commands in chapter 5: I/O redirection
- 7-1. Common environment variables
- 7-2. New commands in chapter 7: Making yourself at home
- 8-1. New commands in chapter 8: Printing
- 9-1. New commands in chapter 9: Backup
- 10-1. The simplified OSI Model
- 10-2. New commands in chapter 10: Networking
- 11-1. New commands in chapter 11: Audio
- B-1. Overview of DOS/Linux commands
- C-1. Common Shell Features
- C-2. Differing Shell Features
-
The file /etc/shells gives an overview of known shells
-
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)
-
bashrc The system-wide configuration file for the Bourne Again SHell. Defines functions and aliases for all users. -
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. -
default Default options for certain commands, such as useradd. -
fstab Lists partitions and their mount points. -
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. -
inittab Information for booting: mode, number of text consoles etc. -
logrotate.* Rotation of the logs, a system preventing the collection of huge amounts of log files. -
profile System wide configuration of the shell environment: variables, default properties of new files, limitation of resources etc. -
services Connections accepted by this machine (open ports). -
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.
-
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,
-
The default location of all logs is /var/log
-
Color-ls default color scheme
Color File type blue directories red compressed archives white text files pink images cyan links yellow devices green executables flashing red broken links
-
-
24 Jul 06
-
11 May 06

Would you like to comment?
Join Diigo for a free account, or sign in if you are already a member.