Các câu lệnh Centos 7 thường dùng:

1. Restart server:
systemctl restart network

2. Rename file:
mv file1.txt file2.txt

3. Xóa file: 

rm nixcraft.txt

Xóa nhiều file: 

rm file1 file2 file 3

Xóa nhiều file sử dụng wildcart và regular expression: 

rm *.abc

với *: thay thế cho cụm từ

4. Reload/Reboot Nginx:
service nginx reload

systemctl reboot

5. Xem dung lượng ổ cứng:
df -h

với -h: hiển thị dung lượng ổ cứng với định dạng có thể đọc được (human-readable format)

6. List all services:
systemctl list-unit-files

7. List service and their open ports:
netstat -tulpnc

8. Check status of a service named sshd:

systemctl status sshd.service

systemctl status nginx.service

journalctl -xe => Exit = Ctrl + z

9. Check Nginx version:

nginx -V

10. Check Nginx configuration: 

nginx -T

11. Check Nginx current perfomance:

Top -i

Leave a Reply

Your email address will not be published. Required fields are marked *