

UserNameDevice:Desktop username$ mkdir newFolder1ĥ. mkdir - Stands for 'make directory.' This will create a new folder within the folder you are currently in. UserNameDevice:Desktop username$ cp Document1.txt Document1Copy.txtĤ. Just follow the command with the file you would like to copy and then the name you would like the copy to be. You can get more info about the content of a directory using ls -al. To list the content of a directory use ls.

You can type pwd to display the current directory you are in. This will create a copy of any file specified in the current directory. To navigate using the terminal you will use 2 commands cd and ls. UserNameDevice:Desktop username$ rm Document1.txtģ. This will delete any file specified in the current directory. 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.Ģ. After this line, you can begin entering commands.ġ. The ' userNameDevice:~ username$ ' line is the prompt that Terminal will give you to enter a command. To move up a directory, the quickest way would be to add an alias to /.bashprofile. will move you up only one directory (the direct parent of the current directory).
Last login: Tue Feb 23 13:00:14 on ttys000 Typing cd will take you back to your home directory. When Terminal is first opened a message similar to the follow appears: Look for the Home Directory option and edit the path to match. Command-line Interface Terminal 2.1 Print Current Working Directory pwd Command 2.2 Change Directory cd Command 2.3 List Directory ls Command 2.4. Right-click on the user account you wish to change the Home folder for and choose Advanced Options. Click the lock icon and authenticate to gain access to making changes to Users. This document explains some of the basic commands for the command line interface in Mac OSX's Terminal. From the Apple menu choose System Preferences and then choose Users & Groups.
