21

This question already has an answer here:

FOr example, in linux you can boot to a terminal, you don't have to load a desktop, window manager, etc. Is there something like this in Mac OS X? And like in Linux, is it possible to switch to one of these from in the desktop?

marked as duplicate by bmike Dec 7 '14 at 2:11

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Can you make your use case clear as in Linux you can't switch from a desktop to a login terminal – Mark Dec 5 '14 at 0:07
  • 6
    @Mark How about Ctrl+Alt+F1? – Nicholas Wilson Dec 5 '14 at 7:49
  • 4
    @Mark Yes you can, on pretty much every distro. – Nit Dec 5 '14 at 12:47
  • 4
    @Mark your assumption is totally wrong. You can in almost every distro I have ever seen.. – Stefan Dec 5 '14 at 13:34
  • OK you can - but the question does need to be explained a bit more as it is not exactly possible in OS X. you can have a full screen terminal from the desktop or a Single User console and no desktop but not both – Mark Dec 5 '14 at 22:30
27

I don't think Single User Mode is really what you want.

A better idea is to use a console login.

To do this, first you have the login window set to show “Name and Password”:

System Preferences → Users & Groups → Login Options → Display login window as: Name and password

Then you can login as ">console" as the username (no password) and get a terminal prompt.

It's not very pretty, but it's handy if you need it.

  • 3
    Neat, didn't know about this. Since what version has this been a part of OS X? – Nit Dec 5 '14 at 12:49
  • 2
    @Nit I tried this on 10.8.5 and the screen just flashes gray for a second, and then shows the login prompt again. – Michael Dec 5 '14 at 15:31
  • 1
    This seems like a security hole to be able to get a prompt with no password... – Michael Dec 5 '14 at 15:32
  • 6
    @Michael This isn't a prompt without a password—the console requires login before the shell is loaded. – grg Dec 5 '14 at 20:14
  • 2
    @Nit - I think this has been around since the beginning of OS X. There's also ">reboot" and ">shutdown" and ">exit". The latter restarts the window server, I believe. Michael - Single User Mode doesn't require a password (unless you have File Vault enabled). ">console" requires a login, as grgarside mentioned. – TJ Luoma Dec 8 '14 at 13:11
13

In addition to what TJ Luoma said, you can also:

  1. Go to the normal login screen, with the list of users.

  2. Select one (any, it doesn't matter) with the keyboard.

  3. Press ⌥ Option+↩︎ Return.

  4. Type >console in the username field, leaving the password blank.

  5. Press ↩︎ Return and log in.

Unfortunately I haven't had much luck with this—sometimes it just doesn't show up, with or without an external display.

7

What you are looking for is called Single-User mode. Restart the computer, once you hear the start-up chime, hold down Command-S and OS X will load everything but the GUI.

3

See Apple's Mac OS X: How to start up in single-user or verbose mode.

On power up hold the 's' key down. You'll enter single-user mode where the interface is via a full screen terminal window (the console).

There are caveats, you are essentially root at that point, and yes you could switch user or execute login.

0

To switch to a console from the desktop just use Terminal.app and maximise it so when you switch to it is the full screen.

Note that this is not the same as Single User Mode as you will be logged in as a user, so it is like xterm under Linux.

Just note that Linux and OS X are different and will do things different ways e.g. from the Linux console boot you can start X11 (i.e. the desktop) but not in OS X.

Not the answer you're looking for? Browse other questions tagged .