One of the Linux (CentOs6.6) system learning notes Series
Since all the applications of the new company are deployed on the Linux server, the boss requires us to understand a little knowledge about the Linux system in every agriculture code, I have never been familiar with Linux before, but I don't want to lag behind others. So during this time, I am crazy about Linux, I watched some online video tutorials for MOOC, and then I made some operations on the video. I got familiar with it. Today is the fourth day, And I summarized it, here we will mainly record some study notes over the past few days and hope to witness our own growth... I also hope to help some friends.
Environment:
Physical machine operating system: Widows7 64bit
Virtual Machine: VMware WorkStation10.0
Linux: CentOS6.6
Regarding the installation process, Baidu already has a lot of great gods who have written the tutorials and are also very detailed. You can simply search and follow the operations ........
-------------------------------------------------------------------------------------------------------- Day1Linux learning: Mount: partition 1,/(root partition) 2, swap partition (swap partition, 2 times the memory (when the real machine memory does not exceed 4 GB ), no more than 2 GB) recommended partition 1,/boot (boot partition, 200 MB) file system structure: root directory --/dev/sda3 --/boot --/dev/sda1 --/etc -- passwd -- shadow -- group --/home --/dev/sda2 in linnux using the/home directory as the drive letter, also known as mount point ---------- command prompt [root @ localhost ~] # Where: root: The current Login User localhost: Host Name ~ Current Directory (Home Directory) user's initial logon location user's home # Super User's prompt normal user's prompt is $ Command Format command [Options] [parameters] ([] brackets indicate optional) Note: some commands do not follow this format. When there are multiple options, you can write them together to simplify the options and complete options-a equals to -- all ----- ls1, and query the contents in the directory: lsls [Option] [file or directory] Option:-a displays all files, including hidden files-l display details-d view directory properties-h humanized display file size-I display inodelinux there are a total of 7 file types: commonly used three types: first letter differentiation-indicates common file d indicates directory l indicates soft link files and special files do not require common users to operate block device files, character device files, socket files, pipeline file user groups and permissions: -rw-r -- 1.-file type (-indicates common file d indicates directory l indicates soft link file) 2. rw-r -- u owner g owner group o others 3. r read w write x execute 4,-rw-r --. the last ". "indicates ACL permission 5,-rw-r --. 1 root 1272 Mar 23 anaconda-ks.cfg1 represents reference count, which indicates reference once the first root is the user (the current file owner) the second root is the group to which the current file belongs) -h humanized display of file size-d view directory properties ls-l/etc/view the properties of all files in the/etc/directory ls-ld/etc/view the/etc/directory property Information ls-lh install. log (install. log indicates a parameter. "file at the beginning of" Hide file 7. ls-I View File ID number (I node). Each file has an ID number. The system searches for files based on this ID number (I node, determine the file location ------------------------------------- Export day21, directory processing command: create directory: mkdirmkdir-p [directory name]-p recursive creation command Original English intent: make directories2, switch Directory: cdcd [Directory] original English intent: simplified change directory operation: cd ~ Enter the current user's home directory cd to enter the current user's home directory cd-enter the last directory cd .. go to the upper-level directory cd. enter the current directory pwd to view the current directory CTRL + L shortcut key clear screen cd japan/cd/root relative path and absolute path relative path: refer to the current directory for search, such: [root @ test ~] # Cd ../user/local/src/absolute path: Specify the path from the root directory and perform first-level recursive search. In any directory, you can enter the specified location, for example, [root @ test ~]. # Cd/etc/cdcd .. /root/japan/cangls/cd .. /root/japan/cangls/press the tab key twice to identify the command. You can press the tab key to identify command completion and directory completion. 3. query the directory location: pwdpwd (print working directory) 4. delete an empty directory: rmdirrmdir [directory name] -- remove empty directoriesrmdir bols/rmdir japan/5. delete a file or directory: rmrm-rf [file or directory] remove option:-r Delete directory (remove)-f force (force) in linux, the root user is a real super administrator, the command rm-rf/with the highest permission will delete all files under the root directory/, but the system will not crash rm-rf/tmp/* or rm-rf/ tmp/required Note 6. copy command: cpcp [Option] [original file or directory] [target directory] copy option: -r copy directory-p joint file property copy-d if the source file is a link file, then copy the link property-a is equivalent to-pdrcp-r japan/tmp/cp. before copying the directory, add the-rll/tmp/ls/tmp/ll command = ls-l7., cut or RENAME command: mvmv [source file or directory] [target directory] movemv japan // tmp/japan1mv does not need to be added when cutting-the-r option mv is the cut command (the source file and the target file are in different directories)) at the same time, it is a renamed command (the source file and the target file are in the same directory) ----------------------------------------------------day31, common directory function/root directory/bin command to save the directory (common use Command)/boot startup directory, start related files/dev Device File Save directory/etc Configuration File Save directory/home common user's home directory/lib system library save directory/mnt system mount directory (empty directory) /misc Mount directory (empty directory)/media Mount directory (empty directory)/root super user's home directory/tmp temporary directory/sbin command save directory (a directory that super users can use) /proc directly writes/sys directly writes/usr System Software Resource Directory/usr/bin/system command (Common User)/usr/sbin/system command (Super User) the/var system documents/proc and/sys directories cannot be operated directly. These two directories store the memory overload point as the memory drive letter, the data in these two directories is directly written into the memory. Therefore, these two directories do not allow direct operations on bin and sbin under the lsls usr/root directory, and bin and sbin under the usr directory, these four directories are used to save system life.. The files in the bin directory can be executed by normal users (either in the root directory or in the usr directory) in the sbin directory, only root Super Users have the permission to execute files. root (super user root) or home (normal user) can be in the home directory ), and exercises in the tmp directory. 2. How to shut down linux? 1. Power off directly. 2. init 0. 3. telinit 0. 4. shutdown-h now. 5. halt6. poweroffshutdown-h. now shutdown