If you click on a link and make a purchase we may receive a small commission. Read our editorial policy.

Minecraft commands and cheats list: the most useful console commands you should know

Use these Minecraft commands to instantly level up, control the weather, and much more

Want to learn how to use Minecraft commands and cheats? The Minecraft console is every bit as creative a tool as Minecraft itself. With it, you can teleport to various locations, change the time or weather, spawn items or entities, chat with your friends, or control entire Minecraft servers filled with players.

Our Minecraft commands list is fully up-to-date with Minecraft 1.20, and will walk you through a selection of the most useful and powerful console commands and cheats in the game.

Cover image for YouTube videoThe Best Minecraft Shaders

How to use Minecraft commands and cheats

To use a Minecraft command or cheat, all you need to do is hop into your Minecraft game and tap the "/" key to open up the console. Every command in Minecraft must start with a "/", but using this shortcut will automatically add the "/" prefix so you can just start typing the command you want to use. Keep in mind that Minecraft commands are case-sensitive, so no capital letters allowed.

Below we'll go over the most useful Minecraft commands and cheats and each one's syntax - also known as the arrangement of each attribute in the command. As you type the syntax, the Minecraft console will suggest which attribute to insert next, so don't worry if you're a bit lost at first.

Following our list of commands, we'll provide an explainer on arguments and targets, which are bits of information included in the command syntax. Note that arguments for the commands on this list have been surrounded by either {angle brackets} or [square brackets]. Angle brackets mean that typing out the argument is required, while square brackets mean that the argument is optional.


The most useful Minecraft commands and cheats

Now let's go over some of the most commonly used and useful Minecraft commands for any player learning to use the Minecraft console.

/help

The "help" command displays an extensive list of all console commands. You can also type the name of another command along with "help" to receive information on how to use that specific command.

Syntax: /help [command]

Example: /help time displays a list of the various console commands you can enter that relate to time, which we'll delve into further below.

/gamemode

The "gamemode" command sets the game mode of the specified player. This command will come in handy if you're a server owner and want to specifically change a player's game mode from Survival to Creative to Adventure, for instance.

Syntax: /gamemode {mode} [player]

Example: /gamemode survival Ollie changes the Minecraft game mode of the player named Ollie to Survival.

/tp

The "tp" command teleports the specified entity or entities to the specified destination. It's shorthand for the identical "teleport" command, and very useful for getting back to your castle or towers after a spot of adventuring. If you're looking for more information on how to specify who you want to teleport, see our explanation on targets below.

Syntax:

  • /tp {destination}
  • /tp {location} [rotation]
  • /tp {targets} {destination}
  • /tp {targets} {entity}
  • /tp {targets} {location} facing {facingLocation}
  • /tp {targets} {location} facing entity {facingEntity} [facingAnchor]
  • /tp {targets} {location} [rotation]

Example: /tp Ollie 300 120 300 teleports Ollie to the coordinates X=300 Y=120 Z=300.

/time

The "time" command allows you to check or change the time - from day, to noon, to night, to midnight. This can be very handy if you're deliberately hoping to farm some mobs that only appear at specific hours.

Syntax: /time {add|query|set} {value}

Example: /time set night will immediately change the in-game time to night.

/weather

The "weather" command sets the weather - from rain to clear to thunder. This is a useful command if you don't want to deal with an annoying spot of constant rain in your Minecraft world, or if you're checking what weather effects look like with different Minecraft shaders.

Syntax: /weather {clear|rain|thunder} [duration]

Example: /weather rain 5s will make rain fall for five seconds.

/give

The "give" command gives an item to a player. This is an obviously vital command if you're building an expansive Minecraft house with a friend and need to hand off some items in your inventory in a jiffy.

Syntax: /give {player} {item} [count]

Example: /give Ollie diamond 5 will give Ollie five Diamonds. By the way, we have a full guide on how to get Diamonds in Minecraft.

/summon

The "summon" command summons the specified entity or Minecraft mob at the specified position. Ever wanted to try a newly crafted weapon against a particular creature? This is the right command to use.

Syntax: /summon {entity} [position] [NBT data tag]

Example: /summon zombie 300 120 300 will summon a zombie to the specified coordinates.

/kill

The "kill" command instantly kills the specified entity or entities. This is handy if you want to clear a particularly nasty mob from your game, or perhaps you're testing things out in Creative mode and want to destroy the entity you just summoned. Once again, for more information on killing specific targets, refer to our explanation on targets below.

Syntax: /kill {targets}

Example: /kill @e[type=zombie] will instantly kill all zombies in the game.

/locate

The "locate" command locates the closest biome, point of interest, or structure of a specified type. This is very useful for finding specific locations like Minecraft Villages, or biomes containing valuable resources that you're seeking to harvest.

Syntax: /locate {structureType}

Example: /locate biome cherry_grove tells you the location of the nearest Cherry Grove biome.

/enchant

The "enchant" command enchants whatever item a player is currently holding. Whether you're experimenting with Minecraft's wide range of enchantment effects or simply want to cheat your way towards a more durable weapon, this is a fun command to experiment with.

Syntax: /enchant {player} {enchantment ID} [level]

Example: /enchant Ollie sharpness casts the Sharpness enchantment on whatever weapon Ollie is currently holding - for instance a Diamond Sword.

/xp

The "xp" command adds, sets, removes, or checks a player's XP. This is shorthand for the /experience command and can be useful for checking your current level or cheating your way into more experience if you just can't be bothered with the Minecraft grind.

Syntax:

  • /xp [add|set] {players} {amount} [points|levels]
  • /xp query {player} {points|levels}

Example: /xp add Ollie 5 levels instantly gives Ollie 5 experience levels. How convenient!


A screenshot of a Minecraft volcano build.

Interested in playing with these commands in some new worlds? Check out our best Minecraft seeds list for a host of great spawn locations!

What are arguments?

Many commands make use of arguments, which are bits of information that come after the command itself. For example, with the command:

/gamemode creative

The command is "/gamemode", and the argument is "creative", which means you are telling the game to set your gamemode to Creative Mode.


What are targets?

Some arguments in Minecraft commands are called targets. These arguments tell the game who (or what) you want the command to target. The following are target arguments:

  • @p (targets the nearest player)
  • @r (targets a random player)
  • @a (targets every player)
  • @e (targets all alive entities in loaded chunks)
  • @s (targets the entity that executed the command)

So for example, the command:

/gamemode creative @a

will set the game mode of every player on the server to Creative Mode, whereas:

/gamemode creative @r

will set the game mode of a random player on the server to Creative Mode.


Alright, that just about wraps up this Minecraft commands guide. If you're looking for other ways to change the game, be sure to check out our list of the best Minecraft mods available for 1.20.4. If you're more interested in changing the look of Minecraft, check out our list of the best Minecraft shaders and best Minecraft Texture Packs. And if you're searching for the right server for all of your online digging and crafting shenanigans, we also have a list of our favourite Minecraft serversfor 2024.

Rock Paper Shotgun is the home of PC gaming

Sign in and join us on our journey to discover strange and compelling PC games.

In this article

Minecraft

Video Game

Related topics
About the Author
Ollie Toms avatar

Ollie Toms

Guides Editor

Ollie is sheriff of Guidestown at RPS, and since joining the team in 2018, he's written over 1,000 guides for the site. He loves playing dangerously competitive games and factory sims, injuring himself playing badminton, and burying his face in the warm fur of his two cats.

Comments