I am new to freeBSD, it is weird to me that I can't logout /neither shutdown the system.

I have sh and csh,, i man the "logout" and it says csh has logout utility so i change to csh and type logout... however, it keeps telling me it is not a login shell. What is that mean? I did login though......

another question ... i know i have to be root to shutdown and i know /sbin/shutdown -h or -r to restart the system....

But what is the command to just shut the system down? I don't need to restart...

Thanks ...

Recommended Answers

>What is that mean? I did login though...
But you didn't log in with that shell. In other words, you're running a shell within a shell, and you must exit those shells first before you can log out. So, type 'exit' to end the csh session, then type 'exit' or …

Jump to Post

Hey There,

Just a small comment. If you have /sbin/shutdown, you can run it with -h to stop your system, also - just leave out the -r and your system should shutdown and halt.

Best wishes,

Mike

Jump to Post

All 5 Replies

>What is that mean? I did login though...
But you didn't log in with that shell. In other words, you're running a shell within a shell, and you must exit those shells first before you can log out. So, type 'exit' to end the csh session, then type 'exit' or 'logout' to finally be brought back to the FreeBSD login screen.

>But what is the command to just shut the system down?
For shutting down a FreeBSD system, as root:

shutdown -p now

Hey There,

Just a small comment. If you have /sbin/shutdown, you can run it with -h to stop your system, also - just leave out the -r and your system should shutdown and halt.

Best wishes,

Mike

Interestingly enough, 'halt' on FreeBSD does not mean the same thing as 'halt' on a Linux system. Running shutdown -h now on a Linux system will halt the system and cut the power. However, on a FreeBSD system, 'halt' means 'halt the operating system', so if you want to cut the power as well, you must use the -p option instead. Simply using -h will leave the machine idling with the "Power down" message displayed.

Interesting, indeed. I wasn't aware of that (I guess, kind of, obviously ;) That's good to know. Just when you think you have it all figured out... right? ;)

Thanks for the clarification and apologies for my misinformed response.

Best wishes,

Mike

thx for everyone's help... i did try -h before and it didn't shutdown the system. it does the same thing as -r but halt until u tell the system to restart.. -p is the one i was looking for and not in my book.. thanks again everybody

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.