or Connect
AppleInsider › Forums › Software › Mac OS X › Boot to Command Line
New Posts  All Forums:Forum Nav:

Boot to Command Line

post #1 of 18
Thread Starter 
How do you boot into OS X straight into the the command line? Like how a normal unix machine whould, asking for username and password, etc. Is this possiable? I know how to boot into single user mode, but thats not exactly what i want.

Just wondering
OS 9 smiles down upon you.
Reply
OS 9 smiles down upon you.
Reply
post #2 of 18
[quote]Originally posted by Spiffster:
<strong>How do you boot into OS X straight into the the command line? Like how a normal unix machine whould, asking for username and password, etc. Is this possiable? I know how to boot into single user mode, but thats not exactly what i want.

Just wondering</strong><hr></blockquote>

Um, if you really just want a command line and nothing else, you could install Linux/BSD... but I know that probably isn't what you want...
post #3 of 18
I don't know how to boot directly into the command line, but you can login as &gt;console at the login screen. From there you can login in as whatever user you want (in the command line).

I wonder if you could trick OS X to automatically boot into &gt;console like how it can automatically log in a user.
post #4 of 18
It's a MACINTOSH !!! goddamit ! GUI !! no &gt;console ... <img src="graemlins/oyvey.gif" border="0" alt="[No]" />
post #5 of 18
Thread Starter 
[quote]Originally posted by Defiant:
<strong>It's a MACINTOSH !!! goddamit ! GUI !! no &gt;console ... <img src="graemlins/oyvey.gif" border="0" alt="[No]" /> </strong><hr></blockquote>

No Sh*t its mac. I've used em way before OS X. I was just wondering if it was possible. Something wrong with asking questions?
OS 9 smiles down upon you.
Reply
OS 9 smiles down upon you.
Reply
post #6 of 18
not sure about osx or bsd, but linux use the directory /etc/rc.d/ and the subdirectories in it. Normally these are numbered rc0, rc1 ... rc6 corresponding to the runlevel the operating system is loading.

In each of these directories is a symbolic link to a program file. eg k30apache, k12named, s10mysql, s14apache.

The "S" links start programs when that run level is used, and the "k" links kill them off when that runlevel is shutdown. Also the programs are loaded in the order of the numbers.

IF OSX (i am still saving for my new mac) uses this kind of method, you might be able to change the symolic links.

WARNING!!!!
If this is the case and you remove the wrong ones, you may find it very hard to boot into osx properly!
"Choice. The problem is choice."
-- Neo
Reply
"Choice. The problem is choice."
-- Neo
Reply
post #7 of 18
Thread Starter 
[quote]Originally posted by Jahy:
<strong>I don't know how to boot directly into the command line, but you can login as &gt;console at the login screen. From there you can login in as whatever user you want (in the command line).</strong><hr></blockquote>

And how whould you go about this?
OS 9 smiles down upon you.
Reply
OS 9 smiles down upon you.
Reply
post #8 of 18
I tried making a new user in my User prefs but the &gt; char is forbidden in the short name feild. So there would have to be a hack of some kind I would think.

Mac Guru
"The young people of America need be taught that the only pride they may properly hold is in the content of their character, and the achievements they make. There is no legitimate pride or moral...
Reply
"The young people of America need be taught that the only pride they may properly hold is in the content of their character, and the achievements they make. There is no legitimate pride or moral...
Reply
post #9 of 18
Thread Starter 
I guess ill answer my own question. <img src="graemlins/lol.gif" border="0" alt="[Laughing]" />

On the login window, hit the down arrow (or similar key), to highlight, but not select the user. Then hold option and hit enter. Then when it prompts you for a user name, type &gt;console. Now your in, just as i wanted.

Damn i feel nerdy tonight.
OS 9 smiles down upon you.
Reply
OS 9 smiles down upon you.
Reply
post #10 of 18
If you want to boot straight into the command line, hold Cmd-Shift-S as the Mac starts. That puts you in 'single user mode' and you get to watch all the pretty text fly up your screen as everything loads.
post #11 of 18
Kesh: He already said that he knows about single-user mode and that that is not what he wants. The biggest problem with SU-mode is that the user has FULL access to EVERYTHING. A standard login prompt would be much better.

Anyhow, yes, the option-enter after selecting a name is exactly the procedure for getting the login/pass text fields (sorry I didn't see this thread sooner). In 10.1 you could easily enable the button for that in the System Prefs, but in 10.2 you have to resort to this trickery.

I'm curious, though. Why do you want it to boot up to a command line? Just for kicks? As I recall, it's rather difficult to start up the Aqua GUI yourself. An X11 environment is far easier. If you are doing this for the latter, you'd really probably be better off with Linux or some other BSD distro.

[ 12-18-2002: Message edited by: Brad ]</p>
post #12 of 18
The thing about linux is that it is weird and scary :-)

I've booted into the command line before and started x-windows (I was using gnome) just to see what it was like. I think it is neat because it helps me get an idea of what linux is like, while not dealing with anything but OS X (and aqua is always nearby).

Thanks for telling about the option enter thing, that will be very useful!
post #13 of 18
I was just wondering, after I boot into single user mode, how do I exit and reboot normally?
...nunc et in hora mortis nostrae...
Reply
...nunc et in hora mortis nostrae...
Reply
post #14 of 18
hehe
[code] reboot
</pre><hr></blockquote>
no joke
heh
125/51041 (top .2449%)-Amie Street - awesome independent DRM-free music
People really have got to stop thinking there is only one operating system, one economic system, one religion, and one...
Reply
125/51041 (top .2449%)-Amie Street - awesome independent DRM-free music
People really have got to stop thinking there is only one operating system, one economic system, one religion, and one...
Reply
post #15 of 18
Single User Mode doesn't need a log-in, but I'm not sure if you are aware of the complete way to boot it.

When the computer starts up, hold down "command-s".

When it asks you to type "fsck -y", do it. This is to fix up any errors in your hard disk. If errors were fixed, run it again (fsck only fixes one error at a time).

After that, type "mount -uw /" to gain access to the boot drive.

Now type "SystemStarter", and that is basically the "Welcome to Macintosh" screen, only in console rather than graphics.

Now type the name of your favourite shell for navigating (the Mac OS X default is "tcsh").

That's it. A way to gain full access to ANY Mac OS X system in the world (as long as it doesn't have an OpenFirmware password set - those are evil, never set them by the way).

"su -u &lt;user&gt;" to Switch Users.

-------------

Turn automatic log-in on, and set the user to &gt;console. Now hold down "command-v" at startup to not load the GUI. Simple, except for the fact that it's not automatic.

Barto

[ 12-19-2002: Message edited by: Barto ]</p>
Self Indulgent Experiments keep me occupied.

rotate zmze pe vizspygmsr minus four
Reply
Self Indulgent Experiments keep me occupied.

rotate zmze pe vizspygmsr minus four
Reply
post #16 of 18
isn't it
[code] /sbin/fsck -y </pre><hr></blockquote>
?? <img src="confused.gif" border="0">
125/51041 (top .2449%)-Amie Street - awesome independent DRM-free music
People really have got to stop thinking there is only one operating system, one economic system, one religion, and one...
Reply
125/51041 (top .2449%)-Amie Street - awesome independent DRM-free music
People really have got to stop thinking there is only one operating system, one economic system, one religion, and one...
Reply
post #17 of 18
You can type the full path if you really want to, but Unix will run any binary with just the filename if the binary is located in a Unix binary folder. For example:

/sbin/
/sw/sbin/
/usr/sbin/

/bin/
/sw/bin/
/usr/bin/
/usr/x11r6/bin/

Barto

[ 12-19-2002: Message edited by: Barto ]

[ 12-19-2002: Message edited by: Barto ]</p>
Self Indulgent Experiments keep me occupied.

rotate zmze pe vizspygmsr minus four
Reply
Self Indulgent Experiments keep me occupied.

rotate zmze pe vizspygmsr minus four
Reply
post #18 of 18
Actually, it finds those "binary folders" by checking a PATH variable for each user. That is why it is important to enter the full path of the binary; if you change your PATH variable, it could point to a different binary altogether.

My current user's PATH variable, for example, contains:

/Users/bwsmith/bin/powerpc-apple-darwin
/Users/bwsmith/bin
/usr/local/bin
/usr/bin
/bin
/usr/local/sbin
/usr/sbin
/sbin

If you install fink and xfree86, it should add the /sw/sbin/, /sw/bin/, and /usr/x11r6/bin/ that Barto listed.

Also, rather than using "reboot" after being in single-user mode, you could enter "exit" to continue booting up.

[ 12-19-2002: Message edited by: Brad ]</p>
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Mac OS X
AppleInsider › Forums › Software › Mac OS X › Boot to Command Line