Basic commands in Linux

Source: Internet
Author: User
Tags parent directory unpack

1. Linux system directory
    • / : root directory
    • /bin : command to execute files under Linux, which is equivalent to exe execution files under Windows
Extensions:Big Data Framework-software-install/Unpack compressed Packages-bin folder
    • /sbin : admin command, root user use
Extensions:Big Data Framework-software-install/Unpack compressed Packages-Sbin folder
    • / etc : Store system configuration files such as/etc/hosts
Extensions:Big Data Framework Hadoop-software-install/unpack compressed Packages-etc folder
    • /home: By default, the normal user master directory/working directory
when creating a user, the default is in the /home directoryCreate a subfolder with the user name as the working directory for this user
    • /opt : Optional meaning, optional, install the software directory
All Big Data software is installed in this directory
    • / usr : User Install program (software) directory, default JDK installation directory
2, Basic command operation 2-1, switching between users $ su-user nameEnter PasswordTo switch users:root switch to normal user1. Exit 2. Su-user name Note There are spaces on both sides!!! 2-2. Basic Operation command
    • LS dir
List all files (directories and files) in the directory
    • Pwd
Show Current working directory
    • Cd
switch to a directoryNothing is added to the CD.users will automatically jump to the user's home directory/home/xxxroot user will automatically jump to/root
    • More
View the contents of the system text file, using page flipping form
    • which
find the location of a namesuch as $ which LS
    • Service
commands that are part of the system administration service that can start services installed on the systemmust use root user action# serivce Iptables stop|status|start|restartFor example:Restart the Nic# Service Network Restart
    • Command line to clear the screen
$ clear or Ctrl + L on the keyboard  Special Directories:The first one: ~ represents the current user's home directory/home/user name,Note the root user home directory/rootThe second one: . Represents the current directoryThe third one: .. Indicates the parent directory of the target directory
    • Change Password: Switch to root user #passwd + username
Enter a new passwordConfirm New Passwordmodified successfully!
    • More tips for use:
text format should be the same as SECURECRT format, otherwise garbledSelect UTF-8
    • The difference between ls and ll :
ls is a display-only namell is displayed in the form of a list in detail (with date, etc.)
    • man query format: Man + content
Press Q to exit
    • Add User:useradd
    • Add Link:ln
    • Create file:mkdir

Basic commands in Linux

Related Article

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.