[LINUX] Summary of frequently used commands (with petit commentary)
This article is conscious of "you can use it with copy and paste!"
A supplementary explanation of when and when to use it as a petite commentary
The path varies depending on the environment, but I am making it available with some changes after copying and pasting
- This article is updated from time to time. Wrong, please add this too! If you have any questions, please comment
Linux
Apache
apache version check
[root@localhost~ #] httpd -v
Move to the front of httpd.conf
[root@localhost~ #] cd /etc/httpd/conf
Edit httpd.conf
[root@localhost~ #] vi /etc/httpd/conf/httpd.conf
Operation check of conf file under / etc / httpd /
[root@localhost~ #] httpd -t
Check access log and error log in real time
[root@localhost~ #] tail -f /var/log/httpd/access_log
[root@localhost~ #] tail -f /var/log/httpd/error_log
Access_log / error_log Move to the front
[root@localhost~ #] cd /var/log/httpd
vi(vim)
[root @ localhost ~ #] vi file name (pass through the path) → The file edit screen will be displayed.
Edit input mode You cannot edit unless you press this.
i
Exit edit input mode
esc key (upper left of keyboard)
Close the edit screen without saving
:q!
Save and close with edit screen
:wq
Save only. Edit screen does not close
:w
One word forward
b
To the end of the word
e
To the next word
w