2015-03-13 Ls,cd,alias,path, directory structure, 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 (ref. http://yangrong.blog.51cto.com/6945369/1288072)
/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
/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

Echo 1 >/proc/sys/vm/drop_caches
/root Root User home directory
/SRV store some data that needs to be extracted after the service is started
/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.

/ETC/RC/ETC/RC.D the directory of scripts or scripts that is running when the run level is started, or changed.

/etc/sysconfig/network IP, mask, Gateway, host name Configuration
/etc/resolv.conf DNS Server Configuration

/etc/fstab boot automatically mount system, all partitions will be automatically mounted on boot

/ETC/INIT.D This directory to hold the system startup script

/etc/profile Global System environment configuration variables

/etc/issue Pre-authentication output information, default output version kernel information

/etc/passwd User Database

/var/log/messages log information, automatic polling by week

/var/log/log files for various programs, especially login

/proc/cpuinfo information about the processor, such as type, manufacturer, model, and performance

/var/log/sercure Logging of User login logs

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:

[email protected]wwwwww src]# cat/etc/profile.d/path.sh
#! /bin/bash
Export path= $PATH:/usr/local/mysql/bin:/usr/local/apache2/bin

[email protected]wwwwww src]# 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.
[email protected]wwwwww src]# CAT/ROOT/.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

2015-03-13 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.