# How to close Linux Dedicated Server in an elegant way?

**URL:** <https://forums.unrealengine.com/t/how-to-close-linux-dedicated-server-in-an-elegant-way/309714>\
**Category:** Platform & Builds\
**Tags:** linux-server, unreal-engine, question\
**Created:** [March 7, 2015, 1:11am UTC](https://forums.unrealengine.com/t/how-to-close-linux-dedicated-server-in-an-elegant-way/309714 "2015-03-07T01:11:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jeffshen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Jeffshen](https://forums.unrealengine.com/u/Jeffshen)\
**Post date:** [March 7, 2015, 1:11am UTC](https://forums.unrealengine.com/t/how-to-close-linux-dedicated-server-in-an-elegant-way/309714/1 "2015-03-07T01:11:46Z")

</div>

I want close my linux dedicated server when game over for do not need the dedicated server any more, and I closed my dedicated server use “kill -9 pid”, it is a rough way, is there an elegant way to stop it ? Make sure the dedicated server released all resources which allocated before, contain the network resources?

---

<div class="post-metadata">

**Author:** ![Jeffshen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Jeffshen](https://forums.unrealengine.com/u/Jeffshen)\
**Post date:** [March 26, 2015, 3:14am UTC](https://forums.unrealengine.com/t/how-to-close-linux-dedicated-server-in-an-elegant-way/309714/2 "2015-03-26T03:14:40Z")

</div>

I changed “kill -9 pid” to “kill -2 pid”, it seems more reasonable!

---

<div class="post-metadata">

**Author:** ![RCL](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RCL](https://forums.unrealengine.com/u/RCL)\
**Post date:** [July 16, 2015, 4:35pm UTC](https://forums.unrealengine.com/t/how-to-close-linux-dedicated-server-in-an-elegant-way/309714/3 "2015-07-16T16:35:51Z")

</div>

SIGINT is indeed a “default” way to make dedicated server quit, but in general logic like this is game-specific - e.g. you may want your master server to start/stop match servers.

---

<div class="post-metadata">

**Author:** ![6r0m](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/6r0m/32/1194563_2.png) [@6r0m](https://forums.unrealengine.com/u/6r0m)\
**Post date:** [January 8, 2019, 11:43pm UTC](https://forums.unrealengine.com/t/how-to-close-linux-dedicated-server-in-an-elegant-way/309714/4 "2019-01-08T23:43:54Z")

</div>

I’m using Ctrl+C and in the log “Shutting down and abandoning modules” as in the window when quit command
