The most common basic commands for Linux

Source: Internet
Author: User

Linux CentOS Common Command **************************///

Install centos6.6 with GNOME desktop

CTRL + C terminates the current command

CTRL + Z Pause

Exit returns

Start Firefox: Firefox & (The role of & is placed in the background to do)

Get root: Su root or Su-switch to new environment

sudo: Executing commands with Administrator status

ID: Get user information

Modify User password: passwd

Shutdown-h now immediately shuts down the machine

Shutdown-r now restart

View list: Ls-a

To view the status of a firewall: service iptables status

When the root tree structure: All files are present in the "/" directory

Strict case sensitivity in the file system

Shut down firewall: Service iptables stop

Open: Start

View linked users: Who

Ctrl+r: Search for historical records

PWD Displays the current working directory

Ls-a Show all files including hidden files

Ls-l Show file Details

File +file Name: file name

Files that start with a dot are hidden files, which are typically configuration files

The blue font is the directory

Top level directory:.

Current directory:.

Basic management and operation of files ********//
CP original file to destination folder
-R Copy Folder
-V Show More information

Create folder: Touch linuxcast (file name)

The folder in the root directory means:

Bin: Executable file (command)

Boot: Boot directory (boot and boot of the operating system)

Dev: Pumping hardware configuration

ETC: all the configuration files

Home: Folder directory, user data for each user


View current system time: Date

Poweroff immediately shut down the machine
Reboot immediate Restart


Command zip to compress files
Zip linuxcast.zip (compressed file name) files to compress

I: Enter edit mode
Esc+:wq Save
: Q exit
: q! Force quit do not save changes

Delete folder: Rm-r folder name

Delete File: RM file name


/usr/local: The main store is the software that is installed manually, that is, not through "new" or Apt-get installed. It has a similar directory structure to the/usr directory. Let the package Manager manage the/usr directory, and put the custom script (scripts) under the/usr/local directory, I think this should be a good idea.

jdk1.7.0_79

Mv/usr/jdk1.7.0_79/usr/local
Cut the JDK file under the USR directory to the local folder of the USR file

Cat file Name: Display the contents of a folder

View host IP Address: ifconfig

MV jdk1.7.0_71/usr/local/move changes files to a different usr/local folder

The most common basic commands for Linux

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.