Summary of linux Study Notes (Comprehensive) --- Absolute classic
Source: Internet
Author: User
Summary of linux Study Notes (more comprehensive) --- Absolute classic-general Linux technology-Linux technology and application information, the following is a detailed description. This article is not original. After reading it, I learned a lot of new knowledge and reviewed it in summary. I think it is very good. I will share it with you!
Linux directory Architecture
/Root directory
/Bin commonly used command binary file object?
/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 solution? RAM Disk required by whol s
/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
/Etc/X11 X Window configuration file, xorg. conf or XF86Config ???? X Server? OK? N
/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
/Etc/init. d/all servers? Miss ??? All scripts are stored in ?? For example, yes ?? Too many bytes P?
/Etc/xinetd. d /? Is it? Super daemon management? Server? Do you have a mind? N category?
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
/Lost + found system? Abnormal? Born ??? R ,?? Why is the segment missing from zookeeper z stored in this object? Lower
/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 some servers ??? Again? Yun? @ Services? Accounts? Why? ?
/Tmp is a common user or is it running? What about a robot ?? R placement? N case
/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
/Usr/bin user? What are the targets of binary file?
/Usr/local/bin user? What are the targets 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 ?? Login system? Access? Expected? N cases, such as pop3, ssh, telnet, ftp, etc ???? Here? N case in progress
/Var/log/wtmp ?? Login's? Information? Material, last
/Var/log/messages? To y? Born ??? Information
/Var/log/boot. log ???? C or some servers ??? Yes? R Hou, institute? Shown ?? Too many P ?? Information
/Var/log/maillog ??? ?? Sendmail? Pop3) User ??
/Var/log/cron ?? Crontab ??? Routine server? ? Hot? Br/>/var/log/httpd,/var/log/news,/var/log/mysqld. log,/var/log/samba,/var/log/procmail. log:
Points? E is ??? Different? Road server? Scratch ??? N
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/-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? Load
Ifconfig displays or sets network devices
Service network restart Nic
Ifdown eth0 disable Nic
Ifup eth0 enable Nic
Clear Screen
History! 55. Execute 55th commands
Stty terminal stty-
Fdisk/mbr Delete GRUB
At? H? One-time job schedule
Crontab cycle ?? Why? Xingyue? [E] edit, [l] display, [r] 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 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? Top ??? Two rows, then? Why? Output to/tmp/top.txt
Pstree uses A tree chart to display the program [A] in ASCII? Listen B, [u] list PID, [p] list account
What is killall? H except some ?? Server? 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 current system? Is already on ?? ? ?? And its PID
Dmesg displays the boot information demsg | more
Nice sets priority nice-n-5 vi & use root? 1 ?? Nice value:-5, used to execute 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 the chkconfig and set the system's various services. The chkconfig -- list Option lists the service statuses.
Ntsysv sets various services of the system
Cpio backup file
Compression command
*. Z compress program? Why? N case;
*. Bz2 bzip2 program? Why? N case;
*. Gz gzip program? Why? N case;
* Is the. tar package? Item ,? K?] Yes? Hows ?;
* Is the .tar.gz tar program packaged? N cases, where? K and ?? Gzip? Whol s
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> [file | device] parts
Cpio-icduv <[file | device] restore
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
Understanding SHELL
Alias displays all current command aliases alias lm = "ls-al" command aliases unalias lm cancelling command aliases
Type is similar to which
Exprot to set or display environment variables
Exprot PATH = "$ PATH":/sbin Add/sbin PATH
Echo $ PATH: Display PATH
Bash entry subroutine
Name = yang variable
Unset name cancel variable
Echo $ name: DISPLAY variable content
Myname = "$ name its me" & myname = '$ name its me' when the single quotation mark $ name loses the variable content
Ciw =/etc/sysconfig/network-scripts/set the path
Env: list all environment variables
Echo $ RANDOM
Set SHELL settings
PS1 = '[\ u @ \ h \ w \ A #\#] \ $' of the prompt characters? Set
[Root @ linux ~] # Read [-pt] variable ----------- read the input variables on the keyboard
?? ? Br/>-p: the rear side can be followed by a prompt character!
-T: the backend can be waited for in seconds? ? Br/> declare declares shell Variables
Ulimit-a displays all restrictions
Ls/tmp/yang & echo "exist" | echo "not exist"
Which means ?,? Ls/tmp/yang? Sniffing? Why? _, Right? Why? Cho "exist", if there is ???, ? Why? Cho "not exist"
Echo $ PATH | cut-d': '-f 5 uses the separator to read the content of section 5th.
Export | cut-c 10-20 read 10th-20 bytes
Last | grep 'root'
Cat/etc/passwd | sort display
Cat/etc/passwd | wc displays "lines, words, and bytes 』
Regular Representation
[Root @ test root] # grep [-acinv] 'search? Statement execution? Filename
?? Else f Ming:
-:? Binary? N case to text? N case search? べ Y
-C :? Find 'search? Statement execution? ?? Br/>-I: Ignore the size ?? Different, so the size ???? Too many? Br/>-n :? ? Travel?
-V: reverse ?? Why? @ ?] There is 'search? Statement execution? ? Which school does it offer? Br/> grep-n '123.txt search the character search? Zookeeper execution
Grep-n't [ea] st'123.txt search for test or taste characters using []? Why? Why? Why? Br/> grep-n '[^ g] oo' 123.txt search for the oo direction not g before ?? [^]
Grep-n '[0-9] '123.txt search for numbers with 0-9
Grep-n '^ the '123.txt Search Start With the row' ^
Grep-n' ^ [^ a-zA-Z] '123.txt search does not start with an English letter
Grep-n '[a-z] $ '123.txt search end-to-end row search with a-z $
Grep-n 'G .. d' 123.txt search any one of the characters starting with g and ending with d ?? Character.
Grep-n 'ooo * '123.txt search must contain at least two oo characters? Character *
Sed text stream editor uses script commands to process text files
Awd mode scan and processing language
Nl 123.txt | sed '2, 5d 'Delete content from the second row to the fifth row
Differences between diff and files
Cmp compares two files
Patch file
Format the file to be printed by pr
Account Management
/Etc/passwd SYSTEM account information
/Etc/shadow account password information is encrypted by MD5 32-bit
Add "*" in front of the password column 『*』『! "Forbidden to use an account
/Etc/group system group information
/Etc/gshadow
Newgrp change logon Group
Useradd & adduser create new user useradd-m test automatically create the user's login directory
Useradd-m-g pgroup test specifies the level
/Etc/default/useradd settings
/Etc/login. defs UID/GID? ? Set
Passwd Change Password passwd test
Usermod
Userdel Delete account userdel-r test
Change the SHELL [-l] used when logging on to the system using chsh to display the available SHELL; [-s] modify your own SHELL.
Chfn changes the information displayed by the finger command
Finger finds and displays user information
Id: displays the user ID id test
Groupadd add Group
Groupmod is similar to usermod.
Groupdel Delete Group
Su test changes su-to root and uses the root environment variable.
Sudo executes commands in other identities
Visudo edit/etc/sudoers and add a line "test ALL = (ALL) ALL 』
% Wheel ALL = (ALL) ALL users in ALL the wheel groups in the system can use sudo.
% Wheel ALL = (ALL) NOPASSWD: ALL users in the wheel group do not use the NOPASSWD password.
User_Alias ADMPW = vbird, dmtsai, vbird1, and vbird3 are added to the ADMPW group.
Admpw all = NOPASSWD :! /Usr/bin/passwd,/usr/bin/passwd [A-Za-z] *, \
! /Usr/bin/passwd root can change the user password, but cannot change the root password (add it before the command! Cannot represent)
PAM (Pluggable Authentication Modules, embedded mode ?)
Who & w view who is online
Last recent host login information
Recently logged on to lastlog? R? Read/var/log/lastlog
Talk with other users
Write sending information write test [ctrl] + d send
Mesg sets the write permission for the terminal. mesg n prohibits receiving mesg y.
Wall sends a message to all users. wall this is q test
Mail write mail
/Etc/default/useradd home directory default settings
Quota displays the used space and restrictions of the disk. quota-guvs shows the current quota limit of the root user.
Quota-vu Query
Quotacheck check disk space and restrictions quotacheck-avug? Why? Mechanical brain/etc/mtab? ?? Partition supported by quota? OK? Why? Br/> [-m] force Scan
Quota must be an independent partition. There must be two files, quota. user and quota. group. Add the following to/etc/fstab:
/Dev/hda3/home ext3 defaults, usrquota, kgquota 1 2
The chmod 600 quota * setting is complete and the restart takes effect.
Edquota edits the quota [u] user of a user or group, [g] group, [p] copy, and [t] sets the grace period.
Edquota-a yang edquota-p yang-u young Replication
Quotaon enable disk space limit quotaon-auvg ?? Uranium? Filesystem
Quotaoff disk space limit quotaoff-?? Quota Restrictions
Repquota-av query? System ?? Persons? What is the filesystem limit of the mechanical parameter quota ?? B
Quota? Operator _ start ?? Filesystem support to the entire ??? OK? What are the main steps? Probably:
1 ,? Set partition filesystem to support quota ?? ? Br/> required by quota? Yes? In partition, only filesystem support is available. What is average? When f, the best support level is ext2/ext3,
Other filesystems? Type? Brother, me?] Yes ?? Now! ?? Filesystem supports quota most ?? Lieutenant fading ?? /Etc/fstab,
Make ?? Why? _ Can the stored quota disk support quota? Sakura? Br/> 2. Create a quota ??? N:
???? Front ??, Integer ?? Quota? Row disk limit ?? ? The n case is aquota. user/aquota. group,
Create ????? N case is required? Do you need to use quotacheck first? Why did yu determine fufu? Br/> 3 ,?? Quota limit? Material:
Again? ?Edquota? Why ?? Every ?? User or group? Can be empty ?? Sakura? Br/> 4. Try again? C ?? Quota:
? After setting the quota, create? Yes? Line quotacheck once, and then use quotaon ??? Why? Br/>
Boot Process Overview
1 ,? Hard to input BIOS ???,? K gets the first ???? C? Set generation ?;
2 ,? Take the first ???? C? Which of the following is the boot Loader (lilo, grub, spfdisk, etc.) of the MBR ?? C ??;
3 ,? Into the Kernel? I series? Core ??, Kernel? Start solution? Whol s ,? K and? L ??? Uranium? Apricot w? Set;
4. Kernel? Using init program? K gets run-level ??;
5. init? Alias/etc/rc. d/rc. sysinit? N case;
6 ,?? Yicong yicang? Topology = M (/etc/modprobe. conf );
7. init? Which of the following statements about execution-level ?? Batch? N (Scripts );
8. init? Hosts/etc/rc. d/rc. local? N case;
9 ,? Logs/bin/login program ,? K. Wait for the user to log on;
10. After login? Start with Shell control master? C.
In/etc/rc. d/rc3.d ?? Start with S, stop with K, and then the number indicates the execution order
GRUB vga settings
Color \ resolution 640x480 800x600 1024x768 1280x1024 bit
256 769 771 773 775 8 bit
32768 784 787 790 793 15 bit
65536 785 788 791 794 16 bit
16.8 M 786 789 792 795 32 bit
./Configure check system information./configure -- help | more help information
Make clean clear the files left before
Make Compilation
Make install Installation
Run the rpm-q command to check whether rpm-ql is installed and query all directories of the suite.
Instructions for rpm-qi query suite rpm-qc [d] configuration files and instructions
Run rpm-ivh to install rpm-V. Check whether the kit has been updated.
Rpm-e Delete rpm-Uvh upgrade and Installation
-- Nodeps forced installation -- test installation
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service