Linux operating system and common basic commands in-depth explanation

Source: Internet
Author: User

first section: Linux Release version

Debian,ubuntu,

Sls,slackware, SuSE

Redhat,centos,fedora

ArchLinux

Gentoo


Section II: User's usage environment

echo $PS 1

[\[email protected]\h \w]\$

\u: Current user name

\h: Host Name

\h:fqdn, full host name

\w: The base name of the current working directory

\w: Absolute path to the current working directory

\$: Prompt

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/73/AF/wKioL1YEDXCgBRPgAAGvvJHtqfA219.jpg "title=" 1.png " alt= "Wkiol1yedxcgbrpgaagvvjhtqfa219.jpg"/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/73/B2/wKiom1YEDXuSQ1djAAChzFMhbAY463.jpg "title=" 2.png " alt= "Wkiom1yedxusq1djaachzfmhbay463.jpg"/>


Section III: Linux file system explanation

1. CD command
CD directly into the home directory (logo is ~)
CD ~
CD-Switch repeatedly between the previous directory and the current directory
. Current directory
.. Top level Directory
2. PWD, displays the current directory (where it is currently)
3. History shows all commands executed before
How many historical commands to save depends on the environment variable: histsize
Where the persistent command is saved when the user exits:
Environment variables: Histfile usually defaults to the. Bash_history in the user's home directory.
Maximum number of possible saves in this file: Environment variable: hisfilesize
What we see is 1000, actually 500 (modified by Red Hat CentOS)

[[email protected]~]# Echo $HISTSIZE
1000
We can modify histsize= "10" and so on to modify the entries displayed after the history of the execution
[[email protected]~]# Type History
History was a shell builtin is a built-in command that helps you get help from history

History
!32 Execute 32nd Order
!! Executes the previous command
History 3 shows only the three most recently executed commands
History-c Empty Command history
history-d 185 Delete The command that made the entry
History-a Save command to. Bash_history, we can execute this command so that he saves it immediately.

4, when such as input ifconfig, do not want to execute, press CTRL + C to terminate the execution of the current command (without deleting the health deleted)
5. Linux hidden files, all files that begin with. are hidden files
View the ls-a display. And..
LS-A does not display:
6, how to get help information of the command
Built-in commands: Help commands, for example: Help history
External command: 1, command--help example: Ifconfig--help
2, man ifconfig actual check is (/usr/share/man)
Garbled, Input: Export lang=en, and then man ifconfig there is no garbled
The manual is divided into chapters, generally 1-9 chapters, the paragraph of the manual:
Name: Names of commands
DESCRIPTION: A detailed description of the command function
Options: All option
; Synopssis: Using formats
Examplesz; Using an example
Files: Configuration files that are first closed with the current command
See ALSO: Other manuals available
formatting strings in Help:
[]: Can be omitted
<>: not omitted
|: Two select 1 or more Select 1
....: Similar content can appear multiple
Man's use mechanism:
Flip Screen:
SPACEBAR: Flip a screen to the end of a file
B: Flip a screen to the file header
Enter: Flip a line to the end of the file
K: Flip a line to the file header

String Search:

/keyword: For example:/description may find more than one, can use N to search for the next, N previous

Launched: Q

Note: Man can provide help manuals for configuration files, system calls, library calls, and so on except for commands, which are in separate chapters.

Info command: Get online documentation

CAI uses info only when the man manual is unable to get enough information or wants to know the development history of the program


This article is from the "Asteroid" blog, please be sure to keep this source http://3203180.blog.51cto.com/3193180/1697999

Linux operating system and common basic commands in-depth explanation

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.