PDA

View Full Version : 2 linux questions



smashedlittlebugger
06-12-2003, 08:15 PM
1. In redhat 9.0, when I hit Control+Alt+Backspace to shut down X all it does is restarts it and I end up at the graphical login screen. Does anybody know the command to properly shutdown X in redhat 9.0?

2. Is there a command I can use to find out my HD geometry? If so, what is it?

Jen C
06-12-2003, 08:33 PM
1. At the graphical login screen, click on the Action Button and select Shut Down.

2. Open a terminal windows, su - to root and enter fdisk -l

You will end up with this sort of information:
Disk /dev/hda: 20.4 GB, 20491075584 bytes
255 heads, 63 sectors/track, 2491 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 13 104391 83 Linux
/dev/hda2 14 2394 19125382+ 83 Linux
/dev/hda3 2395 2491 779152+ 82 Linux swap

Is that the sort of information you were after?

Jen C
06-12-2003, 08:43 PM
Heck, those man pages are helpful as well :D

try man hdparm

The command hdparm -g /dev/hda will also spit out useful information. Just replace the /hda as appropriate.

JohnD
06-12-2003, 09:09 PM
You can also use:

hdparm -tT /dev/hda

to find out the performance of your HDD cache and read/write speeds.

Be careful using this tool to chance the parameters of your hard disk- you can trash the disk contents if you ask it to do something that the disk cannot support.

Chilling_Silently
06-12-2003, 10:37 PM
There is a way you can make it kill X and not respawn...

I cant remember off the top of my head sorry.

I dont have that worry, as I use runlevel 3 as my default, meaning I login from the command line and type:
startx

Seems to work fine ;-)

Graham L
07-12-2003, 01:28 PM
I scratched my head when I saw your problem with shutting down Xwindow. It doesn't do that to me. ;-) But you probably log in to the X Window system. So when you shut down X Window (by any method) yiou are logging out of Linux. So you get a new login prompt. In a new X Window session. :D I start up to the black screen, and start X Window if I need it.

Try telinit 3. That will go down to a straight multiuser/no X Window configuration. You'll probably have to log in again. But it will be to the black screen.

ilikelinux
07-12-2003, 05:22 PM
why would you want to shut down x propperly?

mark.p
07-12-2003, 05:41 PM
Ctl-alt-F2 will give you an init 3 logon prompt as well.
Why shutdown Xwindows? - why not if you just need the command line to do things.
Cuts down system resourses.

Jen C
07-12-2003, 05:43 PM
> why would you want to shut down x propperly?

Not sure I understand your question. You might want to shut down X because you are rebooting or shutting the computer off. On the very odd occassionally it goes nuts and you need to kill it.

Or were you asking why someone would drop to runlevel 3? The telinit3 command shuts down runlevel 5 (X Windows) and drops into system into runlevel 3 - the command line interface (CLI) system. You need to do this sometimes for software you are installing that can't have X running at the time eg, installing nvidia drivers. Some people have it as their default runlevel and as Chill has mentioned, will startx manually when required.



Note: just spotted mark.p's post as I was about to hit post myself, having typed all this out, I'm going to post it anyway :p

ilikelinux
07-12-2003, 06:39 PM
> Ctl-alt-F2 will give you an init 3 logon prompt as well.

Yeh and press ctrl+alt+f7 to get back to x, as it was before as in it was not shut down.