Linux Common commands

Source: Internet
Author: User

Linux Common Commands CD command, enter the specified path example: Cd/home   Enter home path    CD. /test   Enter the parent directory under the test path  . Represents the current directory  /represents the root directory  .. On behalf of the parent directory  ls command, view the folder contents example: Ls/home   View files under Home file   ls/home/test   View file contents of Home/test path     LS-A /home   View the files under the file include hidden files     Ll/home View the contents of the file under Home file display details  tar command   Package Command example: Tar-cvf/tmp/etc.tar/ ETC   Package files in the entire/etc directory into/tmp/etc.tar     TAR-XZVF test.tar   Unzip test file  CP command, copy file example: cp/test/ Log/catalina.out/home   Copy the Catalina file under test/log/to the home file  MV command, moving file example: Mv/test/log/catalina.out/home   Talk tets/log/under the Catalina file to move to the home file  tail command, view file end Information Example: Tail catalina.out   View Catalina.out End information       tail-f catalina.out dynamic View catalina.out file end Info  more command, view file example: More log.out   View log file contents from scratch   Service Tomcat Status   View Tomcat Service status service Tomcat stop   stop Tomcat Services service Tomcat start start Tomcat Service  vi command, Edit File Example: VI test.h   Edit test.h file edit: Press I to enter the edit state, press ESC to enter the command state,: Q Exit,: W Save,: Wq save exit,:!q Force quit  mkdir command, create file example: mkdir AA create AA folder    mkdir-p/aa/bb/cc create multilevel file  rm command, Delete File Example: RM cc Delete cc folder    rm-r AA Delete all contents of AA file  chmod command, assign permission example: chmod 777 AA   Assign AA file all roles have read and write execution permission   chmod +x AA   Assign the AA file executable permissions  su command, switch User example: Su oracle   switch to Oracle user   High User Switching privilege users do not need to enter a password, in turn, you need to enter the password  ps command, View process Status Example: Ps-ef |grep Java   View Java Process  kill command, end process example kii-9 1234 Force End Process  ipconfig command for process number 1234, view network configuration   RPM command, install command example: RPM-IVH aa.rpm   install AA file  top command to view system real-time load situation  shutdown-h now shut down system
Init 0 Shutdown system Shutdown-r now restart
Reboot Restart init 6 Restart Find File example: Find/-name file from '/' start to root file system search for files and directories
Mount/umount mount/unmount File System example: MOUNT/DEV/HDA2/MNT/HDA2 mount a disk called hda2-ok directory '/mnt/hda2 ' already exists
UMOUNT/DEV/HDA2 unload a disk called Hda2-exit users and groups from Mount Point '/mnt/hda2 '
Groupadd group_name Create a new user group
Groupdel group_name Delete a user group
Users and Groups
Groupadd group_name Create a new user group
Groupdel group_name Delete a user group ('-R ' exclude home directory)
Ifconfig View Network Information: Example: Ifconfig eth0 shows the configuration of an Ethernet card
PWD command: Displays the current working directory in the terminal full path Linux under Import data script: 1, enter Linux under: 2, vi test.sql (test.sql file content: @@ 路径 data. sql) 3, switch Oracle user login, modify character set 4, Sqlplus Enter user name password @test.sql

Linux Common commands

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.