Commands · Vanilla · Java & Bedrock
How to Change the Weather with Commands
One command sets the sky. /weather clear for sun, rain for a downpour, thunder for a storm, add seconds to make it last.
How the syntax works
The pattern is /weather <state> [seconds]. The state is clearrain or thunderand the optional number holds it for that many seconds before the game rolls the next weather. Run /weather clear to cancel a storm instantly. Need it frozen for good? Set /gamerule doWeatherCycle false first, then set the sky you want and it stays put.
Quick answers
+How do I change the weather with a command in Minecraft?
Run /weather followed by clear, rain or thunder. /weather clear gives sun, /weather rain starts a downpour, and /weather thunder starts a thunderstorm. The sky changes the instant the command runs.
+How do I stop the rain in Minecraft?
Type /weather clear. It cancels rain or a thunderstorm immediately and sets the sky to clear. You need op in multiplayer or cheats enabled in a single-player world.
+How do I set how long the weather lasts?
Add a number of seconds after the state, like /weather rain 1200 for twenty minutes. When the timer runs out, the game picks the next weather on its own. Leave the number off and the duration is random.
+What is the command for a thunderstorm?
/weather thunder. That brings rain plus lightning and the darker storm sky. Add a duration such as /weather thunder 300 to keep the storm for five minutes.
+Why does the weather command say I do not have permission?
On a server you need op, and in single-player the world must have cheats enabled. Ask an admin to /op your name, or open the world to LAN with cheats turned on to use it.
+Can I turn weather off completely?
Run /gamerule doWeatherCycle false so the weather never changes on its own, then set the sky you want with /weather clear. The state you set then stays until you change it.