How to Use the Kill Command in Minecraft

This Minecraft tutorial explains how to use the /kill command with screenshots and step-by-step instructions.

You can kill a player or a type of mob using the /kill command in Minecraft. Let's explore how to use this cheat (game command).

subscribe button Subscribe

Supported Platforms

The /kill command is available in the following versions of Minecraft:

PlatformSupported (Version*)
Java Edition (PC/Mac) Java Edition (PC/Mac)Yes (1.3.1)
Pocket Edition (PE) Pocket Edition (PE)Yes (0.16.0)
Xbox 360 Xbox 360No
Xbox One Xbox OneYes (1.2)
PS3 PS3No
PS4 PS4Yes (1.14.0)
Wii U Wii UNo
Nintendo Switch Nintendo SwitchYes (1.5.0)
Windows 10 Edition Windows 10 EditionYes (0.16.0)
Education Edition Education EditionYes

* The version that it was added or removed, if applicable.
NOTE: Pocket Edition (PE), Xbox One, PS4, Nintendo Switch, and Windows 10 Edition are now called Bedrock Edition. We will continue to show them individually for version history.

Requirements

To run game commands in Minecraft, you have to turn cheats on in your world.

Kill Command

Examples

How to Enter the Command

1. Open the Chat Window

The easiest way to run a command in Minecraft is within the chat window. The game control to open the chat window depends on the version of Minecraft:

  • For Java Edition (PC/Mac), press the T key to open the chat window.
  • For Pocket Edition (PE), tap on the chat button help command at the top of the screen.
  • For Xbox One, press the D-Pad (right) xbox one on the controller.
  • For PS4, press the D-Pad (right) ps4 on the controller.
  • For Nintendo Switch, press the right arrow button nintendo switch on the controller.
  • For Windows 10 Edition, press the T key to open the chat window.
  • For Education Edition, press the T key to open the chat window.

2. Type the Command

We will cover examples of how to use the /kill command to kill your own player, to kill a specific type of mob, and to kill all mobs except players in the game.

Kill Your Own Player

You may find yourself lost in your Minecraft world and you can't get back home. If you kill yourself, you should respawn where you slept last. This is an easy way to safely get back home.

In this example, we will kill ourself in the game with the following command:

/kill

Type the command in the chat window. As you are typing, you will see the command appear in the lower left corner of the game window. Press the Enter key to run the command.

kill command

Once the cheat has been entered, your game will end and you should see the following screen:

completed kill command

You can click the Respawn button to continue in the game. You will rejoin the game at your spawn point, which is usually the last place that you slept.

When you die, you will have lost all of your inventory. If you retrace your steps to where you died, you will find the items from your inventory and a portion of your experience floating on the ground. You can pick these items up again, if you choose.

spawn after kill command

Kill a Type of Mob

You can also use the /kill command to kill a particular type of mob. For example, if you are creating an adventure map in a superflat world, you might not want all of the slimes everywhere.

In this example, we will kill all slimes in Minecraft 1.20 with the following command:

/kill @e[type=slime]

Type the command in the chat window and press the Enter key to run the command.

kill command

Once the cheat has been entered, you should start to see all of the slimes die.

completed kill command

You will see the message "Killed 71 entities" appear in the lower left corner of the game window to show the total number of slimes that were killed. In this example, a total of 71 slimes were killed.

There is one important thing we should mention about killing slimes (as well as magma cubes). When a large slime is killed, it will drop smaller slimes. So you may need to run this /kill command a couple of times before all sizes of slimes are killed.

Kill all Mobs except Players

In this example, we will kill all mobs (but not players) with the following command:

/kill @e[type=!player]

Type the command in the chat window and press the Enter key to run the command.

kill command

Once the cheat has been entered, you should start to see all of the mobs die, but no players will be affected.

completed kill command

You will see a message such as "Killed 193 entities" appear in the lower left corner of the game window to indicate the total number of mobs that were killed. In this example, there were 193 mobs killed.

Congratulations, you just learned how to use the /kill command in Minecraft!