Reference address: http://bbs.mcuol.com/TopicView.aspx? Boardid = A47AFE05-0872-4DDB-97AE-48ACAFAE265B & topicid = 6c398bb8-442e-46d9-a608-dde48a42417b
Linux directory Architecture
/Root directory
/Bin command binary file
/Boot stores the files that must be read when the system starts, including the core (kernel ).
/Boot/GRUB/menu. lst grub settings
/Boot/vmlinuz Kernel
/Boot/initrd core solves the RAM disk required by zookeeper
/Dev system peripheral devices
/ETC system settings file
/Etc/dir_colors set color
/Etc/hostname: Set the node name of the user.
/Etc/networking only indicates yes indicating that the network exists
The/etc/host. conf file describes how your system queries node names.
/Etc/hosts: set the table for the user's own IP address and name
/Etc/hosts. Allow settings allow inetd machines to use
The/etc/hosts. Deny setting cannot be used by machines that use inetd.
/Etc/hosts. equiv
/Etc/inetd. conf: configure the system network daemon inetd.
/Etc/gateways
/Etc/protocols: Set the protocols supported by the system
/Etc/named. boot sets the local server as the name server configuration file
/Etc/sysconfig/network-scripts/ifcfg-eth0 set IP
/Etc/resolv. conf set DNS
The configuration file of/etc/X11 X Window, Xorg. conf or xf86config.
/Etc/fstab records the file system to be mounted upon startup
/Etc/inittab: Set the runlevel that the INIT process will set when the system starts.
/Etc/issue records information displayed before Logon
/Etc/group: Set the user's group name and related information
/Etc/passwd account information
/Etc/shadow password information
/Etc/sudoers can be the configuration file of the sudo command
/Etc/securetty to set which terminals can be logged on by the root user
/Etc/login. defs default configuration when all users log on
/Etc/exports: Used to set NFS
The/etc/init. d/scripts of all servers are stored here, for example, to be dynamic or to disable
/Etc/xinetd. d/This is the configuration items of the servers managed by the super daemon.
Additional parameter settings for the/etc/modprobe. conf kernel module
/Etc/syslog. conf log setting file
/Home user's home directory
/Library used by the Lib System
/Lib/modules kernel related modules
/Var/lib/RPM kit installation
When the/lost + found system is abnormal, some missing fragments are placed under this category.
/Mount point of MNT peripherals
/Media is similar to/mnt
/Opt additional software installed on the host
/Proc virtual directory, memory ing
/Proc/version kernel version
/Proc/sys/kernel system kernel function
/Root system administrator's home directory
/Sbin Command executed by the system administrator
/Srv the resources required for these services
/Tmp is a common user or a row in progress Program The location where the case is stored at the specified time
/Usr maximum directory, storing applications and files
/Usr/x11r6: X-window directory
/Usr/src: Linux Source code
/Usr/include: System header file
/Usr/openwin: store Sun's openwin
/Usr/man online user manual
Description of binary file that/usr/bin users can parse rows
/Usr/local/bin users can parse the contents of binary file
Function libraries used by the/usr/lib System
The function library used by the/usr/local/lib System
/Usr/sbin commands that can be executed by the system administrator
/Usr/local/sbin commands that can be executed by the system administrator
/Var Log File
/Var/log/secure records the data access cases of the system, such as POP3, ssh, telnet, and FTP.
/Var/log/wtmp reporter information of the login user, last
/Var/log/messages indicates the dynamic transmission information generated by the system.
When/var/log/boot. log is enabled or when some services are active
/Var/log/maillog upload users' logs for access or use sendmail and POP3
/Var/log/cron record the content of the crontab routine Server
/Var/log/httpd,/var/log/news,/var/log/mysqld. Log,/var/log/samba,/var/log/procmail. log:
The difference is that different website services are recorded.
Some common basic commands:
Uname-a view kernel version
Ls-AL: Display Properties of all files
PWD displays the current path
CD-returns the last directory Cd ~ Returns the home directory.
Date S: set the time and date
Cal display calendar Cal 2006
BC Calculator
Man & info help manual
Locale displays all available fonts locale-A in the current font/etc/sysconfig/i18n setting file
Lang = en english font
Sync writes data synchronously to the hard disk
Shutdonw-H now & Half & poweroff Shutdown
Reboot restart
Startx & init 5 enters the graphic interface
/Work &? Work: Search for document content up and down
Chgrp changed the archive group chgrp testing install. Log
Chown changed its owner chown root: Root install. Log
Chmod change attribute chmod 777 install. Log READ = 4 Write = 2 execute = 1
CP copy CP filename
Rm delete file Rm-RF filename force delete file
Rmdir Delete folder
Rename MV 123.txt 222.txt
Create a folder using mkdir
Touch file creation update current time
Cat displays cat from the first line | more pages
NL adds a row number before the content
More & less side flip
Head-N filename: displays row N content
Tail-N filename: The last n rows of content displayed
Od display non-pure document
DF-H display partition Space
Du: displays the directory or file size.
Fdisk partition settings fdisk-L/dev/hda display hard disk partition status
Mkfs creates various file systems mkfs-T ext3/dev/ram15
Fsck checks and fixes Linux Files
Ln hard link ln-S software Link
Whereis SEARCH Command
Locate search
Find find/-name "***.***"
Which viewing tool
Whoami displays the current user
Gcc-V view GCC version
Delete chattr-I filename cancel prohibition
Lsattr show hidden attributes
Updatedb updates the database
Mke2fs format mkfs-T ext3
Dd If =/etc/passwd of =/tmp/passwd. Bak backup
Mount: list all partitions in the system.
Mount-T iso9660/dev/CDROM/mnt/CDROM mounting Disc
Mount-T vfat/dev/fd0/mnt/Floppy mount a floppy disk
Mount-T vfat-O iocharset = utf8, umask = 000/dev/hda2/mnt/hda2 mount the FAT32 Partition
Mount-t ntfs-o nls = utf8, umask = 000/dev/hda3/mnt/hda3 Mount NTFS partitions
Linux-NTFS project: http://linux-ntfs.sourceforge.net/
Umount/mnt/hda3 volume
Ifconfig displays or sets network devices
Service Network restart Nic
Ifdown eth0 disable Nic
IFUP eth0 enable Nic
Clear Screen
History history! 55. Execute 55th commands
Stty terminal stty-
Fdisk/MBR Delete grub
At least one execution schedule
Crontab adopts the regular Command [e] to edit, [l] to display, and [R] to delete a task.
& Background running program tar-zxvf 123.tar.gz & ---------> background running
View jobs in the background
FG transfers the background program to the foreground FG n ------> N is a number, you can specify the program
BG enables the work to run in the background
Kill End Process kill-9 PID [9] force end, [15] Normal end, [l] list available kill Signals
PS aux viewing background programs
Top view background programs top-D 2 update every two seconds top-D 2-p10604 watch a PID
Top-B-N 2>/tmp/top.txt -----> perform the top information twice, and then output the result to/tmp/top.txt.
Pstree uses the tree chart to display the program [a] using ASCII for listing the PID and [p] listing the account
Killall must be deleted from a certain service killall-9 httpd
Free Display memory status free-M --------> displayed in MB
Uptime displays the current system boot time
Netstat displays the network status netstat-tulnp ------> Find the network operator and its PID that have been listened to on the current system
Dmesg displays the boot information demsg | more
Nice sets priority nice-n-5 VI & -----> use root to give nice-5, which is used for copying row vi
Renice adjusted priority
Runlevel displays the current runlevel
Depmod
Lsmod displays the modules loaded into the system
Modinfo displays information about the kernel module
Insmod loading Module
Modprobe automatically processes the load-able Module
Rmmod Delete Module
Check chkconfig and set various system services chkconfig -- list -----> to list various service statuses.
Ntsysv sets various services of the system
Cpio backup file
Compression command:
*. Z compress program zookeeper case;
*. Bz2 Bzip2 program zookeeper case;
*. GZ gzip program upload history case;
* The resources packaged by the. Tar program have not been deleted;
* .Tar.gz tar program packaging example, which has passed the gzip example
Compress filename compressed file plus [-D] uncompress
Gzip filename compression plus [-D] decompress zcat 123.gz to view the compressed file content
Bzip2-Z filename compression plus [-D] unzip bzcat filename.bz2 to view the compressed file content
Tar-CVF/home/123.tar/etc package without compression
Tar-xvf 123.tar unpacks
Tar-zxvf/home/123.tar.gz unzip with Gzip
Extract tar-jxvf/home/123.tar.bz2 with Bzip2
Tar-ztvf/tmp/etc.tar.gz view tar content
Cpio-covb> parts
Cpio-icduv <Restoration
Common VI usage
General mode edit mode command mode
H left a, I, R, O, A, I, R, O: W save
Enter edit mode under J: W! Force save
On K, DD deletes the current row of the cursor: Q! Do not save and exit
L right NDD Delete n rows: WQ! Save and exit
0 move to the beginning of the row YY copy the current row: E! Restore original file
$ Copy n rows to the end of the row: W filename save
H. paste P and P at the top of the screen: Set nu to set the row number.
M screen center U undo: Set Nonu cancel row number
L click [CTRL] + R at the bottom of the screen to redo the last action ZZ and save and exit.
The last line of the G file [CTRL] + Z is paused and exited: Set nohlsearch permanently disables the highlighted display
/Work downward search: SP opens two documents at the same time
? Work: Search [CTRL] + W for two documents
Move Gg to the first row of the file: nohlsearch temporarily disables highlight
End