Computing.Net > Forums > Linux > Basic question

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Basic question

Reply to Message Icon

Name: Wondering
Date: December 15, 2003 at 01:57:30 Pacific
OS: Linux
Comment:

Hi,
I would like to ask a question that even it is VERY simple, it is not in any book.

How do you turn off your computer correctly if you are not the superuser??? (Obviously you dont only press the on/off button :) )

why the question? Suppose I have linux installed in a notebook, and I am not the superuser, then how do I turn it off.

I got a version of Red Hat linux in which this is entirelly possible but in other linuxes I have worked with, this is not explained.

Also, what if the computer is hanged (I know the legened says that Linux computers never have the "blue screen of death" syndrome- but it happens!) if I turn it off and on again, what are the possible consecuences ...

Thanks



Sponsored Link
Ads by Google

Response Number 1
Name: Audiophile
Date: December 15, 2003 at 04:23:19 Pacific
Reply:

Do a "man sudo" for the sudo manual page.

Your system should NEVER hang if you're using a stable-enough kernel. You can have an uptime of 2-3 years if you want to (but the kernel becomes outdated and currently theres no stable way to switch to another kernel without re-booting).

If you're using a journaling filesystem (ext3, reiserfs, xfs), you won't need to do a fsck even after pushing the poweroff button. Usually the data which has been written to disk is not lost.


0

Response Number 2
Name: 3Dave
Date: December 15, 2003 at 05:12:10 Pacific
Reply:

You can also try one of the following commands:
$ halt
or
$ shutdown -h now

If the user doesn't have permission to do so and it is a stand-alone PC used by yourself (ie not a mission critical server or administered by someone else) you could use suid to allow the halt command to runn as root when executed as a user:
# chmod +s /path/to/halt
Obviously if halt is residing in /sbin or /usr/sbin etc it will not be in a normal users path, so create a link:
# ln -s /usr/sbin/halt /usr/local/bin


0

Response Number 3
Name: egkenny
Date: December 15, 2003 at 19:00:32 Pacific
Reply:

Audiophile wrote:
"Your system should NEVER hang if you're using a stable-enough kernel. You can have an uptime of 2-3 years if you want to (but the kernel becomes outdated and currently theres no stable way to switch to another kernel without re-booting)."

I have not seen an operating system that is crashproof. Each tries with different degees of success to protect the system from wayward programs. Even Windows NT, 2000, and XP are not crashproof. They are just less likely to crash than previous version of Windows. The same for linux. I agree that linux seems more stable thant Windows most times but I have lost track of how many times I have crashed it. In fact I just crashed RedHat Fedora two hours ago.


0

Response Number 4
Name: 3Dave
Date: December 16, 2003 at 02:25:13 Pacific
Reply:

Probably the best uptime I've seen is a client we have who has had their BSD box going for about 5 years now. My PC here at work has been up for nearly a month so far, the last time I rebooted was to add a hard drive, the next time will be to add the CD writer sat next to m.....

(Connection reset by peer)


0

Response Number 5
Name: Jonathan
Date: December 16, 2003 at 09:17:21 Pacific
Reply:

Hey Wondering.... do you have a later kernel installed on your notebook (i.e., a kernel with ACPI support)? I set-up ACPI support on my notebook, and now I simply press the power button once, and Linux begins the shut-down process automatically (equivalent of running "shutdown -h now" as a superuser).

Jonathan


0

Related Posts

See More



Response Number 6
Name: Audiophile
Date: December 16, 2003 at 10:52:08 Pacific
Reply:

"Even Windows NT, 2000, and XP are not crashproof."
They abviously are not.

On *BSD and Linux systems, an uptime of 3-4 years is no big deal. That proves the stability.

"Infact I just crashed Redhat Fedora two hours ago"
I'm talking about the kernel here. I crash my X11 every 10 minutes. Tell me if a stable Linux kernel actually crashed.

"Wondering" you can do one more thing, you can edit your /etc/inittab to execute shutdown -h now instead of shutdown -r now. So you can shutdown using CTRL-ALT-DEL (or whatever you set)


0

Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Linux Forum Home


Sponsored links

Ads by Google


Results for: Basic question

Very basic question... www.computing.net/answers/linux/very-basic-question/4381.html

general sendmail questions www.computing.net/answers/linux/general-sendmail-questions/25331.html

Basic Questions about Ubuntu www.computing.net/answers/linux/basic-questions-about-ubuntu/28998.html