---
title: "終止卡住的 rails"
description: "我想終止在特定 port 上執行的 rails。（我的筆電上跑著好幾個 rails 伺服器。）"
canonical: https://oozou.com/til/kill-rails-that-got-stuck-63
locale: zh-Hant
date: 2020-10-13
topic: shell
---

# 終止卡住的 rails

> 我想終止在特定 port 上執行的 rails。（我的筆電上跑著好幾個 rails 伺服器。）

Published: 2020-10-13 · Topic: [shell](https://oozou.com/zh-Hant/til-topics/shell) ([markdown](https://oozou.com/zh-Hant/til-topics/shell.md))

我想終止在特定 port 上執行的 rails。
（我的筆電上跑著好幾個 rails 伺服器。）

*kill -9 $(lsof -i :3000|grep ruby|head -1|awk '\{print $2}')*

---

Contact OOZOU: hello@oozou.com · +66 2544 0000 · https://oozou.com/zh-Hant/contact

More for AI agents: https://oozou.com/llms.txt · every page has a markdown twin at its URL plus ".md"
