Linux commands to use and remember

Linux commands to use and remember

1. Create a file with touch start.sh

2. chmod 777 start.sh to modify file permissions

3. firewall-cmd --query-port=8848/tcp check whether the port number is open

4. firewall-cmd --zone=public --add-port=8848/tcp --permanent, port 8848 can be opened

5. firewall-cmd --reload restart the firewall

6, history 100 view history commands

7, sh startup.sh -m standalone run nacos in standalone mode

8. ps -ef| grep ps is to display the current running process, grep means to search in these

9. df -h displays the current disk space and usage in a more readable way.

df command:

The function of the df command in linux is to check the disk space occupation of the file system of the linux server. You can use this command to obtain information such as how much space the hard disk is occupied and how much space is currently left.

-a list of all file systems

-h easy to read display

-H is equal to "-h", but the calculation formula, 1K=1000, not 1K=1024

-i display inode information

-k block is 1024 bytes

-l only display the local file system

-m block is 1048576 bytes

--no-sync ignore sync command

-P output format is POSIX

--sync Execute sync command before obtaining disk information

-T file system type

Cannot access the Linux host service. It may be that the port used by the service is not open to the outside world, and the port needs to be opened.

firewall-cmd --query-port=8848/tcp Check whether the port number is open

firewall-cmd --zone=public --add-port=8848/tcp --permanent, you can open port 8848

firewall-cmd --reload restart the firewall

Guess you like

Origin blog.csdn.net/qq_36073688/article/details/113274469