windy54
Posts: 86
Joined: Sat Dec 29, 2012 3:37 pm

Reboot or sudo reboot?

Wed Jun 01, 2016 11:18 am

Hi,
Ever since I have had a raspberry PI and using raspbian, from a terminal window I have always typed sudo reboot.

Just found out that you only have to type reboot, shutdown you always need sudo in front.

Out of interest, has this always been the case or has it changed in one of the releases?

Steve

User avatar
MarkHaysHarris777
Posts: 1820
Joined: Mon Mar 23, 2015 7:39 am
Location: Rochester, MN
Contact: Website

Re: Reboot or sudo reboot?

Wed Jun 01, 2016 4:55 pm

This depends somewhat particularly if we're talking about the RPi, and if you're the pi user...

... this depends on what you know about sysvinit vs systemd. These two facilities are used to control the control of the system, init. The old way was sysvinit. The new way, beginning with Jessie, is systemd. The reason is that debian switched to systemd with Jessie 8. Raspbian Jessie followed suit.

reboot, halt, shutdown, and poweroff all symbolically link to systemctl. So, for instance:

sudo systemctl poweroff

... is the 'actual' command on Jessie, with systemd. Similarly with halt, and reboot.

How the implementers went from sysvinit to systemd (using systemctl) is a detail that leaves some scratching their heads... why? what? &c

The best thing I can recommend for you is to study systemd, particularly systemctl &c
marcus
:ugeek:

pcmanbob
Posts: 9298
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Reboot or sudo reboot?

Sat Jun 04, 2016 8:18 pm

It seems there may be a difference between reboot and sudo reboot.

just updated crontabe for the root user using sudo crontabe -e
once I had done did a reboot command with NO sudo.
Pi rebooted ok but cron @reboot commands for root user were not processed.
I had to use sudo reboot to make the cron @reboot commands for the root user work.
some thing to be aware of maybe.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

dgordon42
Posts: 788
Joined: Tue Aug 13, 2013 6:55 pm
Location: Dublin, Ireland

Re: Reboot or sudo reboot?

Sun Jun 05, 2016 1:28 am

windy54 wrote:Out of interest, has this always been the case or has it changed in one of the releases?
It changed in the 27 May release.
Relase notes.

Dave.

windy54
Posts: 86
Joined: Sat Dec 29, 2012 3:37 pm

Re: Reboot or sudo reboot?

Sun Jun 05, 2016 3:42 pm

thanks for the replies, I will start reading the release notes in future! ( well, maybe)

Steve

Return to “Beginners”