Shutting down Kali Linux from the terminal lets you power off safely without using the desktop menus. You can do it immediately or schedule a shutdown with a delay. Save your work first, and make sure you have permission to shut down the system; commands that power off a computer generally require administrator privileges.
What You’ll Need
- Access to a Kali Linux terminal, either on the desktop or through a local text console.
- A user account with administrator access. You may be asked for your password when using
sudo. - Saved files and closed applications, especially if other people are using the computer.
Step-by-Step
- Save your work. Save documents, finish downloads or other important tasks, and close applications. A shutdown can end running programs, and unsaved changes may be lost.
- Open a terminal. In Kali’s desktop environment, open Terminal from the applications menu, or use the keyboard shortcut
Ctrl+Alt+Tif it is enabled. If you are at a text console or connected remotely, you can run the command there instead. - Choose whether to shut down now or later. To power off as soon as the system can do so safely, use the immediate command in the next step. To give yourself time to finish work or warn other logged-in users, schedule a delay instead.
- Shut down immediately. Enter
sudo shutdown nowand pressEnter. If prompted, type your account password and pressEnter. The password does not appear on screen as you type; this is normal. The system will stop services and power off. - Alternatively, use the poweroff command. You can run
sudo poweroffto request an immediate shutdown. This is a straightforward alternative, but use one shutdown command rather than entering several different commands in succession. - Schedule a shutdown if needed. To shut down in five minutes, run
sudo shutdown +5. The number after the plus sign is the delay in minutes. To specify a time, use the 24-hour format, such assudo shutdown 23:30. Read the terminal’s confirmation and check that the requested time is correct. - Cancel a scheduled shutdown if plans change. Before it begins, run
sudo shutdown -c. Check for a cancellation confirmation. This cancels a pending shutdown; it cannot undo a shutdown that is already in progress. - Wait for the computer to turn off. Do not unplug the computer or hold down its power button while Kali is shutting down normally. Once the display goes dark and the machine has powered off, you can disconnect power if needed.
For an immediate shutdown, the essential command is sudo shutdown now. Do not add -r unless you intend to restart: that option requests a reboot rather than a power-off.
Common Mistakes
- Using
rebootby mistake.sudo rebootrestarts Kali; it does not leave the computer powered off. Usesudo shutdown noworsudo poweroffto shut down. - Forgetting
sudo. Without administrator privileges, the command may be rejected. Prefix it withsudoand enter your password when requested. Do not try to work around access controls on a system you do not administer. - Expecting password characters to appear. Terminal password prompts typically show no letters or asterisks. Type the password carefully and press
Enter. - Entering a delay as a clock time.
shutdown +5means five minutes from now, whileshutdown 23:30means 11:30 p.m. in 24-hour time. Verify the format before confirming. - Shutting down a shared or remote machine without warning. Other users may lose work or their connection. Confirm that you are on the intended computer and notify affected users first.
Tips
- Use
sudo shutdown nowwhen you want the command’s intent to be explicit and familiar. - Use a short delay when you need time to save work or alert someone. A scheduled shutdown may notify logged-in users, depending on the system configuration.
- If you are connected over SSH, a shutdown will end the session and make the computer unreachable until it is powered back on. Confirm you have another way to access it before proceeding.
- On a laptop, connect the charger if the battery is low and you need to wait for a scheduled shutdown or complete a lengthy task first.
- Use the normal shutdown process rather than cutting power. It gives the operating system an opportunity to stop services and write pending data.
Troubleshooting
“Permission denied” or an authorization error: Make sure you used sudo, then enter the password for your account. If Kali says your user is not allowed to use sudo, sign in with an authorized administrator account or ask the system administrator. You cannot grant yourself permission without appropriate access.
The command is not recognized: Check that you typed shutdown or poweroff correctly. Run shutdown --help to see the command’s available options. Avoid copying typographic quotation marks or other formatting characters into the terminal.
The computer does not turn off right away: Shutdown may take time while programs close and services stop. Wait for the process to finish rather than repeatedly issuing commands or removing power. If it remains stuck for several minutes, note any error messages and check whether an application is waiting for input. If necessary, ask an administrator to investigate the system logs before attempting a forced power-off.
You scheduled the wrong time: If shutdown has not started, run sudo shutdown -c. If it has already begun, cancellation may no longer work. Do not assume the cancellation succeeded unless the terminal confirms it.
You are unsure whether it shut down: A closed SSH session alone does not prove the machine powered off; a network problem can also disconnect you. Check the physical device, its power indicators, or an authorized management console.
Related
Frequently Asked Questions
What is the simplest terminal command to shut down Kali Linux?
Run sudo shutdown now. It requests an immediate, orderly shutdown.
Can I shut down Kali without sudo?
Usually, a regular user needs administrator authorization. Depending on the desktop and system policy, a graphical session may authorize shutdown differently, but sudo is the standard terminal method.
Does shutdown now power off or restart?
It requests a shutdown and power-off. Use sudo reboot or a shutdown command with a reboot option only when you intend to restart.
How do I shut down Kali after a set number of minutes?
Use sudo shutdown +N, replacing N with the delay in minutes. For example, sudo shutdown +10 schedules shutdown in ten minutes.
How do I cancel a pending shutdown?
Run sudo shutdown -c before the shutdown begins, then verify that the terminal confirms cancellation.
Will shutdown close my programs and save my files?
It closes the system down, but you should not rely on every application saving automatically. Save your work yourself before running the command.