Mac - Terminal FAQ

This document explains some of the basic commands for the command line interface in Mac OSX's Terminal.

_______________________________________________________________________________

When Terminal is first opened a message similar to the follow appears:

Last login: Tue Feb 23 13:00:14 on ttys000

userNameDevice:~ username$

The 'userNameDevice:~ username$ ' line is the prompt that Terminal will give you to enter a command. After this line, you can begin entering commands.


Basic Commands

1. cd - Stands for 'change directory.'  Follow the command with the name of the directory you would like to change to that is within the directory you are currently operating in, such as Desktop or Documents from the User directory.

userNameDevice:~ username$ cd Desktop

userNameDevice:Desktop username$


2. rm - Stands for 'remove'. This will delete any file specified in the current directory.

userNameDevice:Desktop username$ rm Document1.txt


3. cp - Stands for 'copy'. This will create a copy of any file specified in the current directory. Just follow the command with the file you would like to copy and then the name you would like the copy to be.

userNameDevice:Desktop username$ cp Document1.txt Document1Copy.txt


4. mkdir - Stands for 'make directory.' This will create a new folder within the folder you are currently in.

userNameDevice:Desktop username$ mkdir newFolder1


5. ls - Stands for 'list.' This will list all files and folders within the folder you are currently in.

userNameDevice:~ username$ ls

Applications Downloads Movies Desktop

userNameDevice:~ username$

_______________________________________________________________________________







Keywords:mac terminal command line commands osx   Doc ID:61066
Owner:Help Desk K.Group:UW-Milwaukee Help Desk
Created:2016-02-23 14:38 CDTUpdated:2016-02-25 11:58 CDT
Sites:UW-Milwaukee Help Desk
Feedback:  0   0