$ snap run hugo server -D
port 1313 already in use, attempting to use an available port
Start building sites …
hugo v0.111.3-5d4eb5154e1fed125ca8e9b5a0315c4180dab192+extended linux/amd64 BuildDate=2023-03-12T11:40:50Z VendorInfo=snap:0.111.3
可以查看该端口的占用情况
1
2
3
$ lsof -i:1313
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
hugo 3123427 ubuntu 7u IPv4 18984987 0t0 TCP localhost:xtel (LISTEN)