White Linux operation and maintenance of the road 2

1, a linux directory structure and naming convention directory structure
FHS:
Filesystem Hierarchy Standard Chinese meaning is the standard directory hierarchy, is the linux directory specification standard.
/ bin: program files storing basic commands available to all users
/ boot: the boot file storage directory
/ dev: special file storage device or file
device has two types: character devices (linear device), a block device (Random Equipment)
/ etc: the system's configuration file
/ home: the average user's home directory
/ root: administrator home directory
/ run: current directory run library (currently running directory)
/ sbin: system management utility for use
/ tmp: temporary file storage location
/ usr: application directory stored in
/ var: main system configuration files directory

2, the display / etc directory, all to the end of the file or directory .d
LS -d / etc / .d
White Linux operation and maintenance of the road 2
. 3, display / etc directory, all .conf end, and with m, n, r, p, at the beginning of the file or directory
LS / etc / [m, n-, R & lt, P]
.conf

. 4, create / app / rootdir directory and copy / root and all files into the directory, the permissions required to retain original
Related command: mkdir cp ll
create / app / rootdir directory: mkdir -p / app / rootdir
copy / root to all files within the directory, and to retain the existing rights
to ll / root directory permissions look at
start copying: * cp -a / root / / App / rootdir /
view / app / rootdir directory file permissions: ll / app / rootdir
as shown below: retain the original permissions.
White Linux operation and maintenance of the road 2
5, using the command line expanding function, create / tmp / a1, / tmp / a2, / tmp / a1 / a, / tmp / a1 / b, create a directory in / tmp: x_y, x_z, q_y, q_z
related commands : CD mkdir Tree
5.1 Create / tmp / A1, / tmp / A2, / tmp / A1 / A, / tmp / A1 / B
CD / tmp /
mkdir {-pa. 1 / {A, B}, 2}
Tree
White Linux operation and maintenance of the road 2
5.2 in create a directory under the / tmp directory: x_y, x_z, q_y, q_z **
White Linux operation and maintenance of the road 2

6, summed user, user group management commands and command and demonstrate common use
useradd to add users
adduser add a user
userdel Delete user
passwd to set a password for the user
usermod modify user command, you can be modified by the login name usermod, the user's home directories, etc.

User group management related commands
groupadd Add User Group
groupdel delete user group
groupmod modify user group information
groups the user belongs to the user group display
newgrp switch to the corresponding user group

7, file permissions, owner, is a set of management commands what, and demonstrates the use of command and
chmod permissions to change the file or directory.

Format is chmod [options] filename ...

Authorization notation: a direct manipulation of a class of users permission bits r, w, x;

Affiliation management commands: chown, chgrp

chown command: change the owner and group belongs to a file or directory

Format: chown [options] user file name ...

Options: -R: recursive modification

chgrp command: to change the user group file or directory belongs. This command is used to change the file belongs to the user group.

Format: chgrp [options] group file name ...

Note: Only the administrator can modify the file owner and owning group of
8, to create a user gentoo, additional group bin and root, the default shell is / bin / csh, annotation information "Gentoo Distribution's"
useradd -G bin Gentoo, root - s / bin / csh -c "Gentoo Distribution"

Guess you like

Origin blog.51cto.com/14251355/2430545