And a basic introduction to system startup command

Linux installation with the command

   1, linux installation

  • The operating system is installed directly on the hardware device
  • Use VMM management platform (a virtual machine) installed by
  • VMM management platform: Vmware workstations virtualbox
  • Disk partitioning: 3 area must be divided, boot swap /
  • Take a snapshot if something goes wrong, you can restore a snapshot

   2, computer performance : scale → Cluster (strength in numbers)

                                     → load balancing cluster

                                     → High Availability Cluster

                                     → High Performance Cluster (application layer) ------ hadoop cluster = Map reduces + HDFS

                              Application Migration longitudinal expansion →

   3, start the system

           Power:. 1, the BIOS chip → Power On Self Test (to check the hardware is normal)

                                      Reading order problems → system → system where the position of the boot (BIOS): drive network (PXE) U disk CD / DVD ....

                                                     → file system needs to be loaded in the hard disk memory, and the cpu read operation;

                                                      MBR partition (BootLoader): boot the system is used to find and load

                                                                                ↓→LILO

                                                                                ↓ → grub into a first stage, stage 1.5, and a second stage;

                             This, the kernel is loaded, however, and can not run common applications; - kernel

                             Then we would run the first application ---- init

                     2, init: the operating system is divided into 0--67 levels; runs on each level corresponding to the application; (designated default start level)

                             ↓ read the default level 3 (command line) chkconfig / rc. * D (each level required to start the process)

                             ↓ 0-- shutdown 1 - Single-user mode (safe mode) 3-- command line 5-- graphical interface - Start to restart the desktop 6--  

                          rc.local // read the file system starts last, the administrator may need to run the boot command, add here;

                          

                         chkconfig role: Specifies the boot service at which level to start or shut down;

                                  -h --help View Help

                                  See --list list
                                  --level the Name 345 <ON | OFF>   

                         Update-rc.d certain control program in the boot Ubuntu;
                                   -f force Force

                          [Chkconfig can be used on Ubuntu, you need to install]


 

The basic format of Linux commands

  • Command [options] [parameters]
  • []: Representatives brackets, optional; specify achieve a particular function commands;
  • <>: Object code of the command; if not added <> stands can not be omitted;
  • Long integer option
  • Short Options * short options can be combined, while long options can not be combined;

           Extended: command subcommand [options] Parameters


 

The basic use of commonly used Linux commands

     1, echo $ PATH (environment variable)

     2, variable: some are named in memory only;

     3, no longer under the command PATH path can be resolved: → by absolute path to run this command to; the command itself is the absolute path of execution; and some named, is the system default alias (add your own) - alias;

                                                                             which command // Find command absolute path;

                                                                              \ Ls // backslash run directly;

                                                          → Add this path to the path to the PATH; PATH = $ PATH: / xxx / xxx

 

  • LS displays file information

                     -l Detailed information (attributes) // ll view files

                     -i // inode (attribute)

                     -h // human human readable

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

                    -r reverse display file contents

                   -a Show all files (including hidden files)

  • pwd displays the current path

                   $ PWD have a default environment variable; to understand;

  • switching destination path cd

                  - the current user's home directory (/ root / home)

                   The current directory (with files beginning for hidden files)

                   .. the parent directory of the current directory

                   - $ OLDPWD stored on a directory through

  • Touch modification timestamp

                    Stat atime modify the contents of the file access time mtime time ctime modify file attributes

                   Touch a.txt

                   [[CC] YY] MMDDhhmm [.ss] time representation

                   -a modify the access time

                  -m modified Modified

                  -t modified to specify what time

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

  • Mkdir create folders

                  -p -v subdirectories recursively create a multi-stage process of creating detailed display

                  tree to tree form, display the directory and file structure

                 -L NUM see how many level subdirectories

                 -d display only the catalog file

  • Rm delete

                  -f force mandatory

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

                                                                              ↓

                                                                           \rm abc   或   /bin/rm abc

                  -r delete a directory file

  • clear clear screen = ctrl + l
  • Extended about:

                 1, does not apply default rm remove directories - rmdir rmdir only removes empty directories;

                 2, we will need to delete a file or directory under / tmp directory can be;
                       / 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

                        find / -name abc | xargs rm

                        find / -name abc -exec rm {}\;

Guess you like

Origin www.cnblogs.com/star6/p/11285157.html