linux basic commands ①

This time we are speaking under linux commonly used commands:
but first let me give an example:
if you are now in / usr / local / etc directory or a two / etc inside, how to distinguish it is / usr / local / directory under etc or / etc directory under?
This situation can easily use the pwd command solve this problem! As shown below.

pwd

: Lists the current directory and directory path,
Here Insert Picture Description
Here is the ls command, which because of too many options, so I picked out some of the common options to explain, of course, we can try it yourself at the best, but the best option is to use to complete the combination, as shown below:

ls

: Lists files and directories:

Options:
the -l: Detailed list of files, such as author, creation time, read and write permissions list of files, etc. (In fact, this can be done with ll this option and as a result, only a simple point, ls - LL = L)
-a: lists all files, including hidden file, i.e., with a dot ( . ) at the beginning
-H: do file size conversion unit
. : represents the current directory
. : indicates the parent directory
-A: display the current directory of all hidden files, and does not include...
-d: properties display directory itself
-i: index node, inode (file node) before each file has a digital display (i-node index information output file.)
-R & lt: reverse show file (the file is displayed upside down, left and right back, not upside down)
-R: recursively (recursive) display (display only subdirectories, also displays files in subdirectories)
Here Insert Picture Description
in the last move and then use the cd command is an example too, but cd command functions as a single but very practical, so how does it require options, such as columns:

cd directory name

: Change directory
Here Insert Picture Description
Introduction The following is the su command, this command is actually on my linux basic introduction have said before, so here under review.

su username

: Changing user
-l: option to completely switch user
Here Insert Picture Description
su command so it roughly, the following describes the passwd command also said that on the basis of presentation, review here together, by the way also the end of this blog.

passwd password (this should be entered twice)

: Change Password
There is a password for the administrator can arbitrarily change the password, but the average user to change the password required to meet password complexity rules

Guess you like

Origin blog.csdn.net/fanyanluohua/article/details/92401678