Updated:

How to read this list

Items and inventory

CommandWhat it doesSyntax
/giveGives items, with names, enchantments and other data./give <target> <item> [count]
/clearRemoves items from an inventory. A count of 0 just counts them./clear [target] [item] [max]
/itemReplaces or copies items in inventory, equipment and container slots (Java)./item replace entity <target> <slot> with <item>
/replaceitemBedrock version of /item./replaceitem entity <target> slot.armor.head 0 <item>
/enchantEnchants the held item, up to the normal max level./enchant <target> <enchantment> [level]
/xp, /experienceAdds, removes or checks experience points and levels./xp add <target> <amount> [points|levels]
/lootDrops loot table or block-break results into a player or container./loot give <target> loot <loot_table>
/recipeUnlocks or locks recipe book recipes./recipe give <target> *

Players and entities

CommandWhat it doesSyntax
/summonSpawns mobs and other entities, with names, gear and data./summon <entity> [pos] [nbt]
/killKills targets. A bare @e also hits items and armor stands./kill [target]
/tp, /teleportMoves players or entities to coordinates or another target./tp <target> <x> <y> <z>
/effectGives or clears status effects./effect give <target> <effect> [seconds|infinite] [amplifier] [hide]
/attributeReads or sets attributes such as max health, scale and speed (Java)./attribute <target> <attribute> base set <value>
/damageDeals a set amount of a chosen damage type./damage <target> <amount> [type]
/rideMounts or dismounts entities./ride <target> mount <vehicle>
/tagAdds or removes tags used by selectors and /execute./tag <target> add <tag>
/gamemodeChanges game mode./gamemode <survival|creative|adventure|spectator> [target]
/spawnpointSets a player respawn point./spawnpoint [target] [pos]
/spreadplayersScatters players or entities randomly across an area./spreadplayers <x> <z> <spread> <range> <teams> <targets>
/spectateLocks a spectator view to another entity (Java)./spectate [target] [player]

Blocks and world

CommandWhat it doesSyntax
/setblockPlaces or replaces one block./setblock <pos> <block> [destroy|keep|replace]
/fillFills an area with blocks, up to 32,768 at once./fill <from> <to> <block> [mode]
/cloneCopies a region to another place./clone <from> <to> <destination>
/fillbiomeChanges the biome of an area (Java 1.19.3+)./fillbiome <from> <to> <biome>
/placeGenerates structures, features or templates (Java)./place structure <structure> [pos]
/locateFinds the nearest structure or biome./locate structure <structure>
/forceloadKeeps chunks loaded with no player nearby (Java)./forceload add <x> <z>
/tickingareaBedrock way to keep an area running./tickingarea add <from> <to> [name]
/setworldspawnSets the world spawn point./setworldspawn [pos]

World settings and time

CommandWhat it doesSyntax
/timeSets or adds time./time set <day|night|noon|midnight|value>
/weatherChanges the weather. On Java a bare number is ticks./weather <clear|rain|thunder> [duration]
/gameruleChanges world rules. Java 1.21.11 renamed many of them./gamerule <rule> <value>
/difficultyChanges difficulty./difficulty <peaceful|easy|normal|hard>
/defaultgamemodeSets the game mode for new players./defaultgamemode <mode>
/seedShows the world seed./seed
/worldborderSets the center and size of the world border./worldborder set <size>
/tickChanges or freezes the game tick rate (Java 1.20.3+)./tick freeze

Display and effects

CommandWhat it doesSyntax
/tellrawSends styled chat messages./tellraw <target> <text>
/titleShows big text in the middle of the screen./title <target> title <text>
/bossbarShows a bar at the top of the screen (Java)./bossbar add <id> <name>
/particleShows particles./particle <type> [pos]
/playsoundPlays a sound./playsound <sound> <source> <target>
/stopsoundStops sounds that are playing./stopsound <target> [source] [sound]
/say, /msgSends chat messages; /msg, /tell and /w are private./msg <player> <message>
/cameraMoves the camera or fades the screen (Bedrock)./camera <target> set <preset>

Logic and data

CommandWhat it doesSyntax
/executeRuns another command as a target, at a place, or when a condition is true./execute as <target> at @s if ... run <command>
/scoreboardTracks numbers per player: points, money, timers./scoreboard objectives add <name> <criteria>
/teamCreates teams, name colors and friendly fire rules./team add <name>
/dataReads or edits entity and block data (Java)./data get entity <target> [path]
/functionRuns a data pack function./function <namespace:name>
/scheduleRuns a function after a delay. Bedrock has a different /schedule./schedule function <function> <time>
/triggerLets non-operators change one allowed score (Java)./trigger <objective>
/randomRolls a random number (Java 1.20.2+)./random value <min>..<max>
/advancementGrants or revokes advancements (Java)./advancement grant <target> everything

Server

CommandWhat it doesSyntax
/op, /deopGives or removes operator rights./op <player>
/kickDisconnects a player./kick <player> [reason]
/ban, /pardonBans or unbans a player./ban <player> [reason]
/whitelistLets only listed players join./whitelist on
/publishOpens a single player world to LAN (Java)./publish
/save-all, /stopSaves the world or stops the server safely./save-all
/helpLists commands or shows one command's syntax./help [command]

Java and Bedrock differences

Most command names are the same on both editions, but the details are not. Bedrock has no item components, uses different IDs for some items, and some commands such as /data, /item and /attribute are Java only. When a command fails on Bedrock, check the edition note in its guide first, then see why a command is not working.

Check your command

The Command Error Doctor checks common syntax mistakes in your browser.