Like any Unix-based operating system, OS X has a command line interface, which exists independently of and prior to the graphical interface. The Unix-based part of OS X is called Darwin. We normally access it through the TerminalApp, in the Utilities folder.
Some other ways:
- Enter ">console" in the LoginWindow.
- During start-up, hold down command-S (or option-shift-L for a read-only mode).
- type 'sudo shutdown now' at a TerminalApp command line, and OS X will shut down to single-user mode.
When you're done, 'logout' or 'reboot'.
New to the command line?
Command line Interface Tutorial for Newbies
Q. How can I lock/unlock a file on the CommandLine?
A. Mac OS X uses the immutable bit to designate that a file is locked. To lock a file:
[localhost:~] you$ chflags uchg /path/to/file
And to unlock a file:
[localhost:~] you$ chflags nouchg /path/to/file
Q. How can I see on the CommandLine if a file is locked?
A. Use the -o flag of the ls command:
[localhost:~] you$ ls -lo -rw-r--r-- 1 you staff - 5 Apr 12 14:05 ping.txt [localhost:~] you$ chflags uchg ping.txt [localhost:~] you$ ls -lo -rw-r--r-- 1 you staff uchg 5 Apr 12 14:05 ping.txt
1 Some Useful Commands
| open filename | opens a file as though you clicked on the icon for it |
| man commandname | open the ManualPage for the command, find the exact usage for a command |
Q. My Terminal.app (runs a funny script|looks odd|does nor do the right thing|too big|too small| is in the wrong place) when it starts up. How can I stop it doing that bad thing?
A. Like any good OSX app, it keeps it's settings in your Library/Preferences folder. The file is called: com.apple.Terminal.plist This is an XML PropertyList file. If you have PropertyListEditor you can change it's values instantly, otherwise any text editor will do.
Q. Is there a better terminal than Terminal.app?
A. ((iTerm.app)) is what you need. This freeware terminal tool emulates a number of common terminal types and has support for tabs. -- http://iterm.sourceforge.net/
Other pages that may have CommandLine examples:
- CommandLine . . . . 4 matches
- TerminalApp . . . . 2 matches
- ssh . . . . 1 match
- VirtualMemory . . . . 1 match
- UsersAndGroups . . . . 1 match
- ServerAdmin . . . . 1 match
- ScreenSavers . . . . 1 match
- ResExcellence . . . . 1 match
- QuestionAnswerTemplate . . . . 1 match
- ManualPage . . . . 1 match
- LoginWindow . . . . 1 match
- HiddenFeatures . . . . 1 match
- FontManagement . . . . 1 match
- FileSharing . . . . 1 match
- DiveIntoOSX . . . . 1 match
- DirectoryServices . . . . 1 match
- Darwin . . . . 1 match
- BootProblems . . . . 1 match
Other sites that have CommandLine examples: