Virtualization project training basic knowledge

1. Query ngnix command:

# Ps aux | grep ngnix

2. http port 443

3 myql password change

# Mysql -uroot -p ... (... as a password)

4.① absolute path (written by the root from) *
such as: usr / local / MySQL
② relative path (not written by the root from)
such as: advanced user to / home, before moving on to test, command

# Cd / home

# Cd Test

5. PATH environment variable
using the command which to find the absolute path of a command:

# which rmdir

/ usr / bin / rmdir
6. command cp
cp is copy (copy) the abbreviated format is;
cp [options] [source file] [destination file].
As the file test1 test2 can be written as cp test1 test2;
if you want to copy a directory, you must add the -r option, or can not copy the following command:

# mkdir lyz

# cp lyz

-bash (error)

# cp -r lyz

# ls -ld lyz

...
(here will appear ,, drw drw characters such permissions on behalf of Linux file, we will discuss later)

7. Several commonly used commands (and related documents)
① command CAT
CAT is not a word abbreviation, it can view the contents of a file to be displayed on the screen, followed immediately filename command as follows:

# cat lyz/test

zzzyyy
yyyzzz
② command tac
tac ① and the cat is written in reverse order, but also the contents of the file displayed on the screen, tac is to show the last line, and then displays the penultimate line, and finally the first line. Command is as follows:

# tac lyz/test

yyyzzz
zzzyyy
③ command More
More can be used to view the contents of a file, the file name followed immediately, when the contents of the file too, can look back at all of the content front.
8. Change the file permissions
① command chgrp
chgrp (Change Group abbreviation) can change a file's group ownership, the format is:
chgrp [group name] [filename] command is as follows:

# chgrp testgroup test1

# Ls -l test1

② chown command
chown (change owner of abbreviation) can change the owner of the file, the format is:
chown -R] [file name or account name chown -R] [account name: group name filename [- R] applies only to. catalog, not only change the current directory, directory or even file directories and all of the changes. Command is as follows:

# chown user lyz1

# ls -ld lyz1

③ command the chmod
the chmod (Change MODE abbreviation) for changing the user authority to execute file / directory read format; the chmod [-R] lyz123 (file name).
Instead of alphanumeric file permissions, r = 4, w = 2 , x = 1, - = 0.
Rwrxx- numerical example is 760,
the algorithm is: rwx. 4 = + 2 + =. 7. 1,. 4 + = Rxx +. 1. 1. 7 =, - = 0 + 0 + 0 = 0.
8. The special properties of the modified file
① command chattr
chattr (Change attribute shorthand) format chattr = ± [] [] [usr file or directory name], + means increase; - indicates a decrease;
= to set.
9. Find the executable file's absolute path with which command
with which to find the absolute path of vi and cat, the command is as follows:

# which vi

/ Usr / bin / We

# which cat

/usr/bin/cat

Released two original articles · won praise 0 · Views 30

Guess you like

Origin blog.csdn.net/SHININGGALAXY/article/details/104647538