Common operations in linux

1. Switch root user  sudo  su and enter the current password
2. Login first enter the user name and then enter the password
3. Enter the directory cd directory name main directory cd / return to the previous level cd .. cd / root target enter the folder with spaces Add "" or add / in front of spaces
4. Display the directory name ls
5. Create the directory  mkdir java
6. Ubuntu interface to enter dos interface CTRL+ALT+F2~F6
7. Return to the Ubuntu  interface CTRL+ALT+F7
8. Download file wget rename download 
     wget     http://www.linuxde.net/download?id=1   will be named after the last /
    wget -O wordpress.zip   http://www.linuxde.net/download.aspx?id=1080    rename download 
    wget -c  http://www.linuxde.net/testfile.zip use wget breakpoint to resume the upload    
 
9.cp copy files or folders such as   cp /mnt/hgfs/linux/jdk-8u60-linux-x64.tar.gz /usr/java/
10. Run the command rz, that is, to receive the file (upload to Linux) 
11. Run the command sz file to send the file to windows (the saved directory can be configured)
12. View the ip address    ip addr show or ifconfig
13. Edit files 
    Entering vi $ vi myfile is in "command mode"
    Enter the "command mode (command mode)" and click the letter "i" to enter the "insert mode (Insert mode)"
    Press the "ESC" key to go to "command mode (command mode)" and delete the text to exit vi and save the file switch 
    Exit vi and save the file In "command mode (command mode)", click the ":" colon key to enter "Last line mode"
: w filename (enter "w filename" to save the article with the specified filename filename) 
: wq (type "wq", save and exit vi) 
: q! (input q!, force quit vi without saving) 
14. Several methods of software
   1) tar package, such as software-1.2.3-1.tar.gz. It is packaged using tar, the packaging tool for UNIX systems. 
            The source program needs to be compiled 
            1 ) tar –xvzf package name unzip
            2) Execute the "./configure" command to prepare for compilation;
                  The default installation directory is in /usr/local or /opt
                 ./configure --prefix=/usr/local/aaaa, that is, install the software in the aaaa of the /usr/local/ path
     3) Execute the "make" command to compile the software;
     4) Execute "make install" to complete the installation;
     5) Execute "make clean" to delete the temporary files generated during installation
 2) rpm package, such as software-1.2.3-1.i386.rpm. It is a package encapsulation format provided by Redhat Linux.  
            Executable program
            install  rpm --ivh rpm package name
            Execute the command to find the installation directory : rpm -ql firefox-1.0.1-1.3.2
            uninstall  rpm -e softwarename
 3) dpkg package, such as software-1.2.3-1.deb. It is a package encapsulation format provided by Debain Linux.
            Executable program
          Moreover, most Linux application software packages are named according to certain rules, which follow: name-version-modification-type
 
15. Delete the file  rm -rf filename
16. Start tomcat to the bin  directory./startup.sh
 
 
 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324739515&siteId=291194637