Snow Cake August 1 notes

August 1 notes

Introduction to Linux installation and command

1, the installation

[Blog: experimental errors screenshots, and the solution (to write clear platform for their own use)]

  a, directly to the operating system installed on a hardware device (which is so mounted)

  b, using VMM management platform to install (a virtual machine)

(VMM management platform: VMware workstations, Virtualbox)

The first step: choose language

Step Two: choose Keyboard

The third step: choose the time zone

Step Four: Alternative host names

Define the root password (superuser)

Dividing up the disk space ---- 3 partition must be divided into:

 /boot      

 swap   

   /)

Take a snapshot, if an error occurs, you can restore a snapshot!

Computer Performance:. A cluster Scale: strength in numbers

                      b. longitudinal extension (application migration) [not recommended]

Clusters include: load balancing cluster High Availability Cluster High Availability Cluster (application layer) - Hadoop cluster = Map reduces (call) + HDFS

** [under Linux, everything is a file]


 

2, start the system

Power - BIOS chip BIOS program is working

. A power-on self-test: Check the hardware device is working properly

. B ** ** Start System - Select System startup location (the system where the reading order problem (BIOS): drive network (PXE) U disk DVD

. C system files on your hard disk, loaded into memory, allowing the CPU to read and run the MBR partition (BootLoader / LILO / grub into a first stage, 1.5 stage, and a second price segment: help find the file system load) )

This, I have the kernel is loaded, however, and can not use ordinary; - kernel

At this point, we have to apply first application -init

Init: The operating system is divided into 0 --- 6,7 levels, each level corresponding to the application runs, and init will specify the default level, reading default level 3 (command line) - chkconfig / rc *. d (each level required to start the process)

For example: 01,356.

0: Shutdown

1: single-user mode (safe mode)

3: Command Line

5: a graphical interface - Start the desktop

6: Restart

Secondly Rc.local // pump system finally read the file, the administrator may need to turn the cloud of command, add it here.

Chkconfig role: Specifies the service turned on that level, enable or disable

-h -help View Help

--list

--level 345 name (name of the process) <on / off>

Update-rc.d startup control program at some Ubuntu

-f force mandatory

[Chkconfig can then use Ubuntu, you need to install]


 

 3, the basic format of Linux commands

Command [options] [parameters]

   []: Representatives of non-essential, to achieve the development of a specific function command;

   <>: Command execution object represents, if not added <> stands can not be omitted, the object must be added

   Long integer option

   Short Options * short options can be combined, while long options can not be combined

[Extensions]: command subcommand [options] [parameters]


 

4 basic use of commonly used Linux commands

Echo $ PATH (environment variable) must first understand the path a path variable: some memory space it is named

If the command is not in the PATH, how to solve?

. a to run the command with an absolute path to the (absolute path is executing the command itself; and some command is the default -alias alias can add your own)

Which command // super command to find the absolute path

\ Ls // backslash run directly

b. Add this path to the path to the PATH

PATH=$PATH:/XXX/XXX

(1) Ls -------------- displays file information

        For more information -l // view files

        -I // inode (attribute)

        -h // human human readable ()

Attribute information:
-rwxrw-R & lt - the root. 1 the root On Feb 1213 09:39 2 ABC
        - 10 different characters the user can determine what files
        - the first file representative of a character (-), the directory (D), link (l)
        - the remaining three characters per group (rwx), read (r), write (w), execute (the X-)
        - the first group rwx: file owner permissions are read, write, and execute
        - a second set of rw-: and user permissions file owner is the same set of read and write but can not be executed
        - the third group r--: not with the owner of the file with other users permission group read and write can not be executed, can also be expressed as numbers: r = 4, w = 2, x = 1 + 2. 4 therefore + = rwx =. 7. 1
        -. 1 indicates the number of files linked
        - root represents the user
        - root represents a user's group
        --1 213 indicates the file size (bytes)
        - On Feb 2 indicates the last modification date 09:39
        - abc indicate filenames
difference between hard and soft links connected:
       soft links:
soft links have their file attributes and permissions;
you can create a soft link to the file or directory does not exist;
soft link can cross-file system;
a soft link to create a file or directory;
when you create a soft link, link count i_nlink It will not increase;
Delete soft link does not affect the file pointed to, but if the point of the original file is deleted, the associated soft connection is called a dead link (that is dangling link, if they are the path to the file is re-created, dead links revert to normal soft link).
       Hard link:
the file has the same inode and data block;
only to existing files created;
not cross file system to create hard links;
can not create directories, only files can be created;
deletes a hard link files and does not affect other files have the same inode number.

       -f file mark behind the display (used to distinguish the file type)

       -r reverse display file contents

       -a Show all files (including hidden files)

(2) pwd ----------- display the current path

     $ PWD have a default environment variable;

(3) cd -------------- to a target directory

        ~: The current user's home directory (/ root / home)

        .: The current directory (. At the beginning of the file is a hidden file)

        ..: The current directory of the parent directory

        -: once through the store directory OLDPWD

(4) touch --------- modification timestamps

       stat atime ------ access time;

       mtime ------ x modify the contents of the documents of the time;

       ctime ------ modify file attributes          

       touch a.txt

    -a modify the access time

    -m modified Modified

    -t modified to develop what time

    -c modify the file Mtime, if the file does not exist, create the file

(5) Mkdir ---------------- Creating folders  

       -p create multilevel subdirectories recursively

       -v detailed display creation process

       tree to tree form, display the directory and file structure

             -L NUMBER see how many level subdirectories

             -d display only the catalog file

(6) Rm ---------------------- deleted

             -f force mandatory (not directory) -r can delete the directory file

             -i asked to delete the file, the default command (alias rm = 'rm-i')

                 rm abc/bin abc

              Extended; 1, does not apply by default to delete a directory rmdir rm only delete empty directories

                          2, we will need to delete a file or directory, you can lower tmp directory; / tmp directory for temporary files directory, files not accessed for 30 days will be automatically deleted

                          3. If you have to delete some files, we matched up by find, and then delete the line

                           [Extensions] find: find / -name abc xargs rm

(7) clear ---------- clear screen

Guess you like

Origin www.cnblogs.com/caoliyuan/p/11284244.html