![]() You guessed it time for more commands! Much like with the MySQL command, we've included some really nifty helper packages, so don't worry about setting up a server with limited resources. This will perform a number of incredibly useful tasks, such as processing code and passing it to your web server to display. You're on the final package of LAMP installation now you need to install PHP. ![]() Sudo apt update Give the new account root privileges Test if the new user has the root privileges granted, by logging in to the system and run the apt update command prefixed with sudo. Sudo command must be used before writing the command needed for execution, as shown in the below example. sudo usermod -a -G sudo ubuntu_userīy default, all users belonging to the “ sudo” group are allowed to execute commands with root privileges via sudo utility. To grant this new user account with administrative privileges you should add the user to “ sudo” system group by issuing the below command. In order to create a new account on the system, log in to the system with the account user with root privileges and create a new account with the below command.įor now, the new added user cannot perform administrative tasks via sudo utility. sudo adduser ubuntu_userīy default, as a security measure, the root account is completely disabled in Ubuntu. Follow the adduser prompt to setup the user details and password. Make sure you setup a strong password to protect this account. ![]() This was a compilation of different ways to shut down the Ubuntu server and if you have any queries, let me know in the comments.This new account will be granted with root powers privileges via sudo command and will be used to perform administrative tasks in the system. And if you're curious, k stands for kidding! When used with the -k option, it initiates a fake shutdown. You can use it with -r to restart your Ubuntu system instead of shutdown. Shutdown Ubuntu server using the poweroff commandĪ yet another way of shutting down your system from the terminal and that's what I generally use to shut down my servers! sudo poweroff Wrapping Up And when used at runlevel 0, it will shut down the system. The init (initialization) is the parent of every process with a PID of 1. Shutdown Ubuntu server using the init command sudo systemctl poweroffĪnd it gets the instant effect! 3. Using systemd is debatable but Ubuntu utilizes it by default so let's put it to work. When the countdown is equal to or less than 5 minutes, it won't allow any new login activity. For example, let's schedule it to shutdown after 15 minutes: sudo shutdown +15 To shut down your system immediately, pair the shutdown comment with now: sudo shutdown nowĪnd it also allows you to schedule shutdown in Ubuntu. It schedules a shutdown after one minute. While I've already shown the usage of the shutdown command at the beginning of this tutorial, it won't shut down the system immediately. Shutdown Ubuntu server with the shutdown command That might seem elementary, but it's good to have a note of it before you run the shutdown command.īut wait, you can't expect Linux to have a single solution. If you are using Ubuntu on a cloud server like Linode or DigitalOcean, then you can 'power on' the system from your account.If you are doing it on a remote system, make sure that there is a way to turn on the machine. If you are using Ubuntu on a bare metal system (physical system), you need to have access to it to turn it on again.Well, you can use the shutdown command: sudo shutdownīefore you do that, you should keep a couple of things in mind because unlike rebooting Ubuntu, your system needs to be turned on explicitly after a shutdown. Want to shut down your Ubuntu system from the command line? ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |