Jump to content

Mac OS X Tiger/Utilities/Terminal

From Wikibooks, open books for an open world

Introduction

[edit | edit source]

OS X includes a bash, Bourne Again Shell, for taking advantage of its power Unix-like kernel Darwin. The bash shell was developed by Brian Fox in 1987 for the GNU Project, as a free, as in freedom, and improved terminal for using with Unix and Unix-like operating systems. The terminal is used by entering commands and their parameters in the form of text, with output also usually being text based. It's is comparable to Windows' MS-DOS prompt. More information about Unix can be found in the Guide to Unix.

Useful Commands

[edit | edit source]

man [command name] - Used by entering man and then the name of the command, who wish to know more about. It then displays the command's man page, which tells the user exactly what the command does and that additional parameters the user can specify. When it doubt use it!

ls - Lists the contents of the current directory

cd [directory] - Moves from the current directory to the specified path name.

ps -ax - Lists all the current active processes along with their process number

kill [number] - This can be used to force quit any process running on your system by entering the process number obtained by using ps -ax. Probably not a good idea to use it unless you know what you're quitting.

vi [Filename] - vi is the standard Unix text editor, however it would take another article to describe all it commands and how to use it. If you don't specify a file name a new file will be created.

pico - Another text editor, slightly more user friendly, but not as standard, as vi.

emacs - Another 'text editor' emacs has evolved to become almost and operating system in and of itself, again it would take another wikibook to describe all it's features and uses.

tar -parameters [Filename] - Tar, short for Tape Archive, is a bundling program than can also be used to compress or decompress files. Use -x or -c, as parameters, to extract or create a tar file. Further options can change the name of the tar file and the compression used.

mkdir - Creates a new folder

rmdir - Deletes a folder

rm - Deletes a file