Well-written linux study notes

Source: Internet
Author: User
Tags uncompress
Well written linux study notes linux Directory Architecture/root directory/bin commonly used commands binaryfile contents? /Boot stores files that must be read during system startup, including/boot/grub/menu including the core (kernel. lstGRUB settings/boot/v... well written linux study notes linux Directory Architecture/root directory/bin commonly used command binary file contents? /Boot stores the files that must be read when the system is started, including the core (kernel)/boot/grub/menu. lst GRUB settings/boot/vmlinuz kernel/boot/initrd core solution? RAM Disk/dev system peripheral devices required by whais/etc system related configuration file/etc/DIR_COLORS set color/etc/HOSTNAME set user node name/etc/NETWORKING only YES indicates network existence /etc/host. the conf file describes how the user's system queries the node name/etc/hosts and sets the corresponding table/etc/hosts for the user's own IP address and name. allow settings allow machines that use inetd to use/etc/hosts. the deny setting does not allow machines that use inetd to use/etc/hosts. equiv does not need a password for the remote host/etc/inetd. conf sets the configuration of the system Network Daemon inetd/etc/gateways and sets the vro/etc/protocols to set the protocols supported by the system/etc/named. boot sets the local server name as the 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 sets the runlevel/etc/issue that the init process will set the system to when the system starts recording the information displayed before the user logs on information/etc/group set the user's group name and related information/etc/passwd account information/etc/shadow password information/etc/sudoers can be set in the configuration file/etc/securetty of The sudo command which terminals can allow the root user to log on to/etc/login. the default/etc/exports configuration for all defs users to log on to/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? /Etc/modprobe. additional parameter settings for the conf kernel module/etc/syslog. conf log setting file/home user's home directory/relevant modules of the function library/lib/modules kernel/var/lib/rpm suite/lost + found system used by the lib system? Abnormal? Born ??? R ,?? Why is the segment missing from zookeeper z stored in this object? Mount point of/mnt peripherals/media and/mnt similar/opt additional software installed on the host/proc virtual directory, is the memory ing/proc/version kernel version/proc/sys/kernel system kernel function/root system administrator's home directory/sbin system administrator can execute commands/srv some servers ??? Again? Yun? @ Services? Accounts? Why?? /Tmp is a common user or is it running? What about a robot ?? R placement? In case n, the largest directory of/usr is stored in the application and file/usr/X11R6: X-Window directory/usr/src: Linux source code/usr/include: the system header file/usr/openwin stores SUN's OpenWin/usr/man online user manual/usr/bin users? What are the targets of binary file? /Usr/local/bin user? What are the targets of binary file? The/usr/lib system will use the function library/usr/local/lib system will use the function library/usr/sbin system administrator can execute the command/usr/local/sbin System Administrator command to be executed/var log file/var/log/secure ?? Login system? Access? Expected? N cases, such as pop3, ssh, telnet, ftp, etc ???? Here? In the n case,/var/log/wtmp ?? Login's? Information? Item, 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? /Div>/var/log/httpd,/var/log/news,/var/log/mysqld. log,/var/log/samba,/var/log/procmail. log: minute? E is ??? Different? Road server? Scratch ??? N some common basic commands: uname-a view kernel version ls-al display all file attributes pwd display current path cd-return the last Directory cd ~ Return home directory date s set time, date cal show calendar cal 2006bc calculator with man & info help manual locale show current font locale-a all available fonts/etc/sysconfig/i18n set file LANG = en use the English font sync to write data to the hard drive shutdonw-h now & half & poweroff shutdown reboot restart startx & init 5 to enter the graphic interface/work &? Click work to search for the document content. change the chgrp testing of the archive Group to install. log chown changed its owner chown root: root install. logchmod changed the attribute chmod 777 install. log read = 4 write = 2 execute = 1cp copy cp filenamerm delete file rm-rf filename force delete file rmdir delete folder mv move mv 123.txt 222.txt rename mkdir create folder touch create file update current time cat is displayed starting from the first line. cat | more pages. nl adds the row number more & less to the content to flip the head-n filename to display the tail-N filename to display the last n rows. content od display non-pure document df-h display partition space du display directory or file size fdisk partition settings fdisk-l/dev/hda display hard disk partition status mkfs establish various file systems mkfs-t ext3/dev/ram15 fsck check and repair LINUX file ln hard link ln-s software link whereis search command locate find/-name "***. * ** "which viewing tool whoami display current user gcc-v view GCC version chattr + I filename prohibit deletion chattr-I filename cancel disable lsattr display hidden file attribute updatedb update database mke2fs format mkfs -t ext3 dd if =/etc/passwd of =/tmp/passwd. bak backup mount list all system partitions mount-t iso9660/dev/cdrom/mnt/cdrom mount disc mount-t vfat/dev/fd0/mnt/floppy mount floppy disk mount-t vfat -o iocharset = utf8, umask = 000/dev/hda2/mnt/hda2 mount fat32 partition mount-t ntfs-o nls = utf8, umask = 000/dev/hda3/mnt/hda3 mount the ntfs partition Linux-NTFS Project: http://linux-ntfs.sourceforge.net/umount /Mnt/hda3? Ifconfig display or network device service network restart Nic ifdown eth0 disable Nic ifup eth0 enable Nic clear screen history! 55. run the 55th command stty to set the terminal stty-afdisk/mbr to delete GRUBat? H? The row-once job schedule crontab cycle ?? Why? Xingyue? [E] edit, [l] display, [r] delete the task and run the background program tar-zxvf 123.tar.gz & ---------> run jobs in the background to watch the program jobs-lfg paused in the background and set the background program to fg n in the foreground ------> n is a number, you can specify the program bg to enable the worker to run the kill termination process in the background. kill-9 PID [9] is forcibly terminated, and [15] ends normally, [l] list available kill signal ps aux View background program 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/tmp/top.txt pstree to the tree chart to display the program [A] in ASCII? Listen B, [u] list PID, [p] list account killall want? H except some ?? Server? Killall-9 httpdfree display memory status free-m --------> Display uptime in MB Display current system boot time netstat display network status netstat-tulnp ------> find the current system? Is already on ??? ?? And its PIDdmesg display the boot information demsg | morenice sets the priority nice-n-5 vi & -----> use root? 1 ?? Nice plant? -5, used? Adjust vi renice adjust priority runlevel display current runleveldepmod analysis loaded module dependency lsmod show loaded system module modinfo display kernel module information insmod loaded module modprobe automatic processing load module rmmod delete Module chkconfig check, set various system services chkconfig -- list -----> list various service statuses ntsysv set various system services 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? # Package the compressed file content tar-cvf/home/123.tar/etc, uncompress tar-xvf 123.tar uncompress the package tar-zxvf/home/123.tar.gz and decompress tar-jxvf/home/123.tar.bz2 with bzip2 to unzip tar-ztvf/tmp/etc.tar.gz- covB> [file | device] cpio-icduv <[file | device] restore vi general usage General mode Edit mode command mode h left, i, r, o, A, I, R, O: W save j enter edit mode: w! Force save k and dd to delete the current cursor row: q! Do not save leave l right ndd delete n rows: wq! Save and move from 0 to the beginning of the row yy copy the current row: e! Restore original file $ move to the end of the row nyy copy n rows: w filename save as H screen Top p, P paste: set nu set row number M screen center u undo: set nonu cancel row number L at the bottom of the screen [Ctrl] + r redo the last action ZZ save exit G file last line [ctrl] + z pause exit: set nohlsearch permanently disables highlight/work downward search: does sp open two documents at the same time? Search [Ctrl] + w for work and move gg to the first line of the file: nohlsearch temporarily disable highlighted display understand SHELLalias display all current command aliases alias lm = "ls-al" command alias unalias lm cancel command alias type similar to whichexprot setting or display environment variable exprot PATH =" $ PATH ": /sbin add/sbin in PATH echo $ PATH display PATH bash enter subroutine name = yang set variable unset name cancel variable echo $ name display variable content myname = "$ name its me "& myname = '$ name its Me' $ variable content missing $ name in single quotes ciw =/etc/sysconfig/network-scripts/set path env list all environment variables echo $ RANDOM display at will number of instances Set SHELLPS1 = '[/u @/h/w/A #/#]/$' for the prompt character? Set [root @ linux ~] # Read [-pt] variable ----------- read the input variables on the keyboard ??? /Div>-p: The rear side can be followed by the prompt character! -T: The backend can be waited for in seconds?? /Div> declare declares the shell variable ulimit-a to display all restrictions. ls/tmp/yang & echo "exist" | echo "not exist" means ?,? Ls/tmp/yang? Sniffing? Why? _, Right? Why? Cho "exist", if there is ???,? Why? Cho "not exist" echo $ PATH | cut-D': '-f 5 separator, read 5th-segment content export | cut-c 10-20 read 10th-20 bytes of content last | grep 'root' search for a row with root, add [-v] reverse search cat/etc/passwd | sort display cat/etc/passwd | wc display regular expression of "line, word count, number of bytes" [root @ test root] # grep [-acinv] 'search? Statement execution? #39; filename ?? When f:-:? Binary? N case to text? N case search? べ Y material-c :? Find 'search? Statement execution? #39; times ?? /Div>-I: ignore the size ?? Different, so the size ???? Too many? /Div>-n :?? Travel? -V: reverse ?? Why? @ ?] There is 'Search? Statement execution? #39 ;? Which school does it offer? /Div> grep-n '123.txt search the character ----------- search? ぬㄗ grep-n't [ea] st'123.txt search for two characters: test or taste --------- use []? Why? Why? Why? /Div> grep-n '[^ g] oo '123.txt search for oo ----------- direction ?? [^] Grep-n '[0-9] '123.txt search for numbers with 0-9 grep-n' ^ the '123.txt search start with the row ----------- start with the row search ^ grep- n' ^ [^ a-zA-Z] '123.txt search does not start with an English letter grep-n' [a-z] $ '123.txt search for rows ending with a-z ---------- search for $ grep-n 'g .. d '123.txt search start with g and end with d character ---------- any one ?? Character. grep-n 'Ooo * '123.txt search contains at least two oo characters? Character * sed text stream editor uses script commands to process text files awd mode scanning and processing language nl 123.txt | sed '2, 5d 'delete content from the second to fifth rows diff compare file difference cmp compare two files difference patch file pr to print file format account management/etc/passwd system account information/ the password information of the etc/shadow account is encrypted with MD5 32-bit encryption and "*" is added in front of the password column 『*』『! "Disable the use of an account/etc/group system group Information/etc/gshadownewgrp to change the logon group useradd & adduser to create a new user ---------> useradd-m test to automatically create the user's logon directory useradd-m- g pgroup test ---------> specify the level/etc/default/useradd related settings/etc/login. what are defs UID/GID?? Change passwd password -----------> passwd testusermod modify user account userdel delete account -----------> userdel-r testchsh change the SHELL [-l] used to log on to the system to display the available SHELL; [-s] modify your own SHELLchfn change the information displayed in the finger command finger find and display the user information id show the user ID -----------> id testgroupadd add groupmod and usermod similar to groupdel delete group su test change user su-enter root, use the root environment variable sudo to execute the command mongodo to edit/etc/sudoers and add a line "test ALL = (ALL) ALL" % wheel ALL = (ALL) sudo % wh is available for ALL users in the wheel group in the ALL system. Eel ALL = (ALL) NOPASSWD: ALL users in the wheel group do not need passwords NOPASSWD User_Alias ADMPW = vbird, dmtsai, vbird1, and vbird3 to join 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 be) PAM (Pluggable Authentication Modules, embedded mode ?) Who & w shows who has logged on to the host last time online? R? Read/var/log/lastlog talk with other users write send message write test [ctrl] + d send mesg set write permission for the terminal mesg n prohibit receiving mesg y wall send to all users information wall this is q testmail write mail/etc/default/useradd home directory default settings quota display disk used space and restrictions quota-guvs -----> show current root's own quota limit value quota-vu query quotacheck check disk space and restrictions quotacheck-avug ----->? Why? Mechanical Brain/etc/mtab? ?? Partition supported by quota? OK? Why? /Div> [-m] forced scanning of quota must be an independent partition with quota. user and quota. the two files of group are added to/etc/fstab:/dev/hda3/home ext3 defaults, usrquota, kgquota 1 2 chmod 600 quota, restart edquota to edit the quota [u] user of the user or group, [g] group, [p] copy, [t] set the grace period edquota-a yang edquota-p yang-u young -----> Copy quotaon to enable disk space limit quotaon-auvg --------> ?? Uranium? Disable disk space limit quotaoff-a --------> ?? What is the limit on repquota-av? 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 ??? /Div> required by quota? Yes? In partition, only filesystem support is available. what is average? When f, the best support level is ext2/ext3, and other filesystems? Type? Brother, me?] Yes ?? Now! ?? Filesystem supports quota most ?? Lieutenant fading ?? /Etc/fstab, making ?? Why? _ Can the stored quota disk support quota? Sakura? /Div> 2. create a quota ??? N :???? Front ??, Integer ?? Quota? Row disk limit ??? The n case is aquota. user/aquota. group. you need to create ????? N case is required? Do you need to use quotacheck first? Why did Yu determine fufu? /Div> 3 ,?? Quota limit? Expected: then? ?Edquota? Why ?? Every ?? User or group? Can be empty ?? Sakura? /Div> 4. try again? C ?? Quota :? After setting the quota, create? Yes? Line quotacheck once, and then use quotaon ??? Why? /Div> Introduction to boot process 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? Dependencies = 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 User Login. 10. after login? Start with Shell Control master? C. In/etc/rc. d/rc3.d ?? Start the instance starting with S, and disable the instance starting with K, the subsequent numbers represent the execution sequence GRUB vga set color/resolution 640x480 800x600 1024x768 1280x1024 bit 256 769 771 773 775 8 bit 32768 784 787 790 15 bit 793 785 788 791 794 16 bit 16.8 M 786 789 792 32 bit. /configure check system information. /configure -- help | more help information make clean clear the files left before make compile make install rpm-q -----> query whether to install rpm-ql ------> query all directories of this suite rpm -qi -----> description of the query kit rpm-qc [d] -----> configuration file and description file rpm-ivh ----> install rpm-V --------> check whether the kit has been updated with rpm- e ------> delete rpm-Uvh -------> upgrade and install -- nodeps -----> Force install -- test -----> test and install
Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.