当前位置:网站首页>jt-day10

jt-day10

2020-11-09 23:48:00 Early Bird

1. Linux summary

1.1 Linux summary

Linux It is a multi-user network operating system with stable performance

1.2Linux characteristic

  1. The system is open source and free
  2. Very low hardware requirements 800M 3-4
  3. The system is stable
  4. Better system security  ( Military enterprises Broken net )

1.3Linux System mainstream products

image.png

1.4 Linux command

explain :Linux It's all file based . also Linux The directories in are all tree structures

1.4.1 cd Command set

ifconfig/ip addr             Check IP Address 
pwd                             Check the current position 
tab key                         Automatic completion ( Pay attention to uniqueness )

**cd /  Return to root 
cd .  Current directory 
cd .. Go back to the previous Directory 
cd /usr/  Enter into usr Catalog 
cd –  Back to previous directory **

cd  Go straight home 
cd ~  User home directory ****

1.4.2 ls Contents and ll file

1.4.3 Directory operation

mkdir  Create directory 
mkdir a  establish  a Catalog 
mkdir -p a/b  establish  a Catalog , And in a Create in directory b Catalog 
mkdir -m 777 c  Create a permission for 777 Of C Catalog 
rmdir   Delete directory ( If there are files in the directory , You can't use this command )

1.4.4 Vi/vim establish / see / Edit the file

 Command line :Esc Switch to command line mode .

 Edit mode :

 Press i, Start editing in front of the cursor 

 Press a, Start editing after the cursor 

 Press o, Start editing on the next line of the current line 

 Press u,  Undo the previous operation 

 Bottom line mode : Press  shift+: The colon .

:q!  Exit without saving 

:wq  Save and exit 

:/world  From the current cursor , Upward search world keyword 

:?world  From the current cursor , Look behind world keyword 

1.4.5 Delete file

rm  Delete file 

rm n.txt  Tips y Delete n give up 

rm –f n.txt  No prompt 

rm –rf dirname  Do not prompt recursively delete all contents in the directory 

rm –rf *  Delete all files 

rm –rf /*  Delete all subdirectories, all and files 

1.4.6 Copy and move files

cp Copy file 

cp nginx.conf n.txt

cp –R tomcat1 tomcat2                # Copy the entire directory 

mv  Change file name , Moving files 

mv n.txt m.txt  Modify file name 

1.4.7 Packing command

tar –cvf n.tar ./*  Compress all files and directories in the current directory , The file named n.tar
tar –xvf n.tar  Unzip the files in the package to the current directory ( If the decompression is not successful for a long time  Ctrl+C Introduction )
tar –cvzf m.tar.gz ./*  Compressed files 
tar -zxvf m.tar.gz         decompression m.tar File to current directory 

2. virtual machine

2.1 characteristic

1. Create a new virtual image of the existing operating system through the virtual system , It has a real windows The system has exactly the same function
2. You can install and run the software independently , Save the data

版权声明
本文为[Early Bird ]所创,转载请带上原文链接,感谢