1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

railsのプロセスを停止させる

Posted at

railsというか特定のプロセスを停止させる方法です。

pidの確認

下記コマンドで3000番ポートで起動しているプロセスのIDを確認します

lsof -wni tcp:3000

するとこんなのが出てきます。

COMMAND   PID   USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
ruby    24301 ubuntu    6u  IPv4 161869      0t0  TCP *:3000 (LISTEN)

この場合プロセスIDは24301ですね。

プロセスを停止させる

下記コマンドで停止させます。

kill -9 pid

先程確認したプロセスIDの場合だと

kill -9 24301

ですね。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?