Leigh Kalbli
asked on
linux commands
I am using a variant of blackfin linux. I am new to it and reading so much documentation. What is the command needed to reboot.?
In most linux distributions, the command is 'shutdown' with the -r option to reboot, you also need to specify time before rebooting, specifying 'now' will cause a reboot immediately.
ASKER
Thanks for the response. do you need to be under a specific directory?
On some linux distribution reboot command would also work.
POSIX style you could do init 6 which should also reboot the system.
more details here:
http://www.binarytides.com/linux-command-shutdown-reboot-restart-system/
Sudeep
POSIX style you could do init 6 which should also reboot the system.
more details here:
http://www.binarytides.com/linux-command-shutdown-reboot-restart-system/
Sudeep
Are you on a direct linux machine or accessing a VM using putty or something? I am just curious. Either way, in Linux the basic command from any directory would be "sudo poweroff" to shutdown or "sudo reboot" to restart it. Give that a go and let us know.
You should be able to issue either reboot or shutdown -r either one.
If these fail... then either you original installation had some sort of error or the command you're trying has been removed.
Also your $PATH variable may have been corrupted.
Try typing...
If this fails, you have some serious problems, if it works, then try running which for reboot + shutdown.
If this fails, try using the locate command for each command - reboot + shutdown.
Once you have the absolute path, you should be able to execute either, by absolute path.
If these fail... then either you original installation had some sort of error or the command you're trying has been removed.
Also your $PATH variable may have been corrupted.
Try typing...
which sh
If this fails, you have some serious problems, if it works, then try running which for reboot + shutdown.
If this fails, try using the locate command for each command - reboot + shutdown.
Once you have the absolute path, you should be able to execute either, by absolute path.
ASKER
some additional background. This is an embedded version on hardware that i didn not install that comes from a manufacture we are partnered with. They are telling me it cannot be rebooted remotely but have to be local and unplug it but if i can SSH to it then i dont see why i have to be there to power cycle.
sudo cmds dont work.
sudo cmds dont work.
Have you tried just simply typing the word "reboot" and seeing what it does?
ASKER
Tried reboot. Restart. Reset. No dice.
The other command, which is listed in your screenshot, is 'halt', you can use the --reboot option with that to restart the system.
http://www.man7.org/linux/man-pages/man8/halt.8.html
http://www.man7.org/linux/man-pages/man8/halt.8.html
Another thing, when typing commands is to specify the path to the command e.g. ./reboot (dot forward-slash) or /bin/reboot, rather than just reboot as the current folder is not included the command path, due to security reasons.
ASKER
Try running 'su' to enter super user mode and enter the root password, then run the reboot command again.
These commands need to be run as root, so you need to precede them with sudo or su, depending on the variant of linux that balckfin follows..
su - shutdown -r
sudo -i init 6
sudo -i reboot
You can't run them as a user.
With su, you need to enter the root user's password.
With sudo you need to enter the user's own password.
su - shutdown -r
sudo -i init 6
sudo -i reboot
You can't run them as a user.
With su, you need to enter the root user's password.
With sudo you need to enter the user's own password.
It may also be that the directory containing the shutdown and reboot executables simply isn't in the PATH environment variable of any user other than root.
Well, it looks like you will have to power cycle the device manually.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.