--- tags: aliases: date: 2025-11-26 time: 14:23:23 description: --- ## 刪除某一個 port 以 port `:3` 為例。 用 `lsof` 查詢 port ```shell > sudo lsof -i TCP:5903 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME Xtigervnc 2205039 juiwen 9u IPv4 20394056 0t0 TCP *:5903 (LISTEN) Xtigervnc 2205039 juiwen 10u IPv6 20394057 0t0 TCP *:5903 (LISTEN) ``` kill PID: ```shell kill -9 1364 ``` 重開 port: ```shell /usr/bin/vncserver :3 -geometry 1920x1080 -depth 24 -localhost=no ``` # 參考來源