Open the Command Console with the Forward Slash Key
To type commands in Minecraft PC, press the forward slash key (/) on your keyboard. This opens the command console at the bottom of your screen — a text box where you can type. The console appears whether you are in Creative mode, Survival mode, or any other game mode, but commands only work if cheats are turned on in your world.
If you are playing on a server or in a multiplayer world, check with the server owner or administrator first. Some servers restrict which commands players can use, and some disable commands entirely.
Once the console is open, type your command and press Enter to execute it. The command will run when ready, and the console will close. If you want to type another command, press the forward slash key again.
Key Takeaways
- Press the forward slash key (/) to open the command console at the bottom of your screen.
- Cheats must be turned on in your world settings before any command will work.
- Type your command into the text box, then press Enter to run it.
- Command syntax is strict — spaces, spelling, and punctuation must be exact, or the command will not execute.
- The Tab key auto-completes command names and player names as you type, which saves time and prevents typos.
Turn On Cheats Before Commands Will Work
Commands do not work unless cheats are enabled in your world. If you are starting a new world, the "Allow Cheats" toggle appears in the world creation screen before you generate the world. Turn it on there, and commands will be available from the moment you spawn.
If you are already playing in a world where cheats are off, you cannot turn them on without creating a new world or using a backup. Minecraft does not allow you to enable cheats mid-game in a survival world you want to keep.
On a server, the server owner controls whether cheats are on. If you are playing on someone else's server and want to use commands, ask the owner to enable them — or check whether the server has a separate creative mode world where commands are already turned on.
Use Tab to Auto-Complete Commands and Player Names
As you type a command, press the Tab key to auto-complete the word you are typing. If you start typing /give and press Tab, Minecraft will finish the word for you. If multiple commands start with the same letters, Tab cycles through the options.
Tab also works for player names. If you are typing a command that targets a player — for example, /teleport PlayerName — start typing the player's name and press Tab. Minecraft will auto-complete it from the list of players in your world or on your server. This prevents spelling mistakes and saves typing time.
If Tab does not auto-complete, the command or name you typed may not exist, or you may have made a typo earlier in the command. Check the spelling and try again.
Common Command Syntax Rules
Minecraft commands follow strict rules. The command name comes first, followed by arguments (the details that tell the command what to do). Spaces separate each part, and the order matters. For example, /give @s diamond 64 means "give the player running the command 64 diamonds" — but if you swap the order or misspell a word, the command will not work.
Some commands use selectors — shorthand for targeting players or entities. @s means "the player running the command." @a means "all players." @p means "the nearest player." These selectors are case-sensitive and must be typed exactly as shown.
If a command does not work, check the spelling, the order of arguments, and the syntax. Minecraft will show an error message in the console if something is wrong. Read the error message — it usually points to where the mistake is.
Read Error Messages to Fix Broken Commands
When you type a command with a mistake, Minecraft displays a red error message in the chat or console. The message usually tells you what went wrong — for example, "Unknown command" (you misspelled the command name), "Incorrect argument" (you used the wrong value or format), or "Unknown player" (the player name does not exist).
Error messages are your guide to fixing the command. If you see "Unknown command," double-check the spelling. If you see "Incorrect argument," check that you used the right type of value — numbers where numbers belong, player names where player names belong, and so on.
If you are unsure what a command does or what arguments it needs, look up the command in the official Minecraft wiki or a command reference. Each command has a specific syntax, and the wiki shows the exact format.
Use Command Blocks for Repeating Commands
If you want a command to run automatically or repeatedly, place a command block in your world. Command blocks are special blocks that execute commands when activated. You can find them in the Creative mode inventory, or you can summon one with the command /give @s command_block.
Right-click a command block to open its interface. Type your command into the text field (without the forward slash), set the block to "Repeat" or "Impulse" mode depending on whether you want it to run once or continuously, and close the interface. The block will execute the command when powered by redstone or when set to "Always Active."
Command blocks are useful for automating tasks, creating mini-games, or running commands on a schedule. They are available only in Creative mode or in worlds where cheats are on.
Know the Difference Between Single-Player and Server Commands
In a single-player world where you have cheats on, you can use any command. On a multiplayer server, the server owner decides which commands are available to which players. Some servers allow all players to use all commands. Others restrict commands to operators (admins) only, or disable certain commands entirely.
If you try to use a command on a server and get a "You do not have permission" message, you do not have the right to use that command on that server. Ask the server owner or an admin if they can grant you permission, or ask them to run the command for you.
If you are running your own server, you can control command permissions in the server properties file or through a permissions plugin. Check your server software's documentation for how to set up command permissions.
Frequently Asked Questions
What if the forward slash key does not open the command console?
Check that cheats are turned on in your world settings. If they are off, commands will not work. Also make sure you are not in a chat window — if you have the chat open, the forward slash will type into the chat instead of opening the command console. Close the chat first, then press the forward slash key.
Can I use commands in Survival mode?
Yes, if cheats are turned on when you create the world. Commands work in any game mode as long as cheats are enabled. However, using commands in Survival mode disables achievements in that world.
How do I undo a command I just ran?
Minecraft does not have an undo feature for commands. If you ran a command that changed something you did not want changed — like deleting blocks or items — you will need to fix it manually or reload a backup of your world. Always save your world before running unfamiliar commands.
Why does my command say "Unknown command" even though I typed it correctly?
The command may not exist in your version of Minecraft, or you may have made a small typo. Check the spelling letter by letter, including capital letters if the command uses them. Also check that you are using the right Minecraft version — commands change between Java Edition and Bedrock Edition, and between different game updates.
Can I see a list of all available commands?
Type /help to see a list of commands available in your world. You can also type /help [command name] to see details about a specific command. The official Minecraft wiki has a complete command reference for your version of the game.