Lesson-3 ls/cd/path/alias/shortcut keys

Source: Internet
Author: User

Content Summary:

1. Command ls
-L Detailed information
-A view hidden files or directories
-D only look at the directory itself, not the files and directories below the directory
-T in chronological order

2 directory Structure
/bin,/sbin,/usr/bin,/usr/sbin Place the command directory, Sbin is the command that Superuser root can use
/boot Linux kernel and the file directory required by the boot system program
/dev Stores external Linux devices
/etc/Configuration file Directory
/home User House Directory command: Useradd
/lib command: LDD
/media,/mnt
/OPT is a directory for some large software or some special software
/proc System Kernel Mapping
Echo 1 >/proc/sys/net/ipv4/icmp_echo_ignore_all
/root Root User home directory
/selinux
/SRV store some data that needs to be extracted after the service is started
/sys
The/sys/class contains all the device types registered in kernel, linked to devices
/sys/dev maintains a list of primary and secondary numbers by character device and block device, linked to device
/sys/device is a global device architecture, containing all the discovered physical devices registered on various buses, a hierarchical representation model of all the devices in the system, and the most important directory structure for/sys file system management devices.
/SYS/FS describes all file systems in the system
/sys/kernel stores all the adjustable parameters in the kernel
/tmp temp file
/USR User program storage directory, similar to the Win Programs Files folder
var stores things that are constantly expanding, and we are accustomed to placing directories that are often modified in this directory. Includes various log files.

3. CD command
After the CD does not add anything, is to enter the current user's home directory
CD ~ the ~ symbol here also indicates the user's home directory
CD-Switch to the previous directory
Cd.   .. Where. Represents the current directory,.. Represents the previous level of the directory
Note that the absolute path, relative path concept is distinguished, where the absolute path is the From/start

4. Use of the environment variable path
echo $PATH can view the value of the system's environment variable path and use the which command to see the absolute path of a command
Path= $PATH:/tmp so that we can use the executable file/tmp/as a command
To make the path permanent, you need to add it to the/etc/profile, restart it, or run the command directly:
Source/etc/profile

Alias settings command aliases, such as Alias Aming= ' Ls-lt '
De-alias using Unalias aming
To make the alias permanent, you need to add the alias command to ~/.BASHRC.

5. Shortcut keys
CTRL + C Cancel command
CTRL + Z Pause command
CTRL + a cursor to the beginning
Ctrl+e cursor to end of line
Ctrl+u Delete all characters before the cursor
Ctrl+k Delete all characters after cursor
Ctrl+l Clear Screen
Ctrl+d Sign Out = = Exit
Ctrl+s lock Command terminal, press any key will not react
CTRL+Q unlock Command terminal

Lesson-3 ls/cd/path/alias/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.