Ls,cd,alias,path, directory structure, shortcut keys

Source: Internet
Author: User

  1. LS List

    -l List Details

    -T in chronological order

    -d lists the current directory

    -A lists all files, including hidden files.

  2. CD command

    . Current directory

    .. Parent Directory

    CD ~ Enter the current user home directory

    CD does not follow any parameters, directly into the current user home directory

  3. PATH environment variable

    The echo $PATH lists the values of all environment variables for the current system, by default:

    /usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:

    If you want to add temporarily, you can use path= $PATH: XXXX, example path= $PATH:/tmp

    /usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/tmp

    To make the path permanent, you need to add it to the/etc/profile, restart it, or run the command directly:
    Source/etc/profile

  4. Directory structure

    [[email protected] ~]# Tree/-l 1 View the main directory structure under the root of the current system:

    Where/bin,/sbin,/usr/bin,/usr/sbin The directory used to hold the command, where/sbin,/usr/sbin is used for root.

    /

    ├──bin 

    ├──boot launch profile

    ├──dev store Linux external devices

    ├──etc for configuration files

    ├──home User's home directory-Normal user's home directory:/home/username

    ├──lib link library

    ├──lib64

    ├──lost+found 

    ├──media 

    ├──mnt

    ├──opt  a directory for some large software or some special software

    ├──proc system kernel mappings

    ├──root Administrator Root home directory:/root

    ├──sbin

    ├──selinux

    ├──srv

    ├──sys

    ├──tmp for temporary files

    ├──usr used to hold user's installer files

    └──var Most of the logs are stored

  5. Shortcut keys

    CTRL + a cursor back to the beginning

    Ctrl+e cursor jumps to the end of the line

    Ctrl+l Clear Screen

    Ctrl+u Delete all characters before the cursor
    Ctrl+k Delete all characters after cursor

    CTRL + C terminates the current operation

    ALT+F cursor moves forward to the next word

    ALT+B cursor moves backwards to the next word

    Ctrl+w Delete from the cursor position to the beginning of the current word

    Ctrl + R display: Prompt to find relevant historical commands according to user input (Reverse-i-search)

    These are more commonly used.



This article is from the "My Linux Road" blog, so be sure to keep this source http://8641765.blog.51cto.com/8631765/1695987

Ls,cd,alias,path, directory structure, shortcut keys

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.