Check out the other articles in the series:
ditto : Make copies of files in directories.This article is part two in a series about using Linux skills when working in a mac operating system.open : Open the file you specified using the directory path.Here are some basic commands that you can learn: For example, ls -C sorts the files in the requested list by size. You can modify (or change the output) of the ls command by adding an operator. So if you're in Documents and type ls, you'll see a list of all the files or folders in Documents. For example, you can use the ls command to see a list of all the files in the current directory. Most of the basic Terminal commands involve navigating files or folders on your computer. Here are a few Terminal commands you can try, but there are dozens of Mac Terminal commands that you can use to suit almost any of your needs. With the basics, you can start using Terminal commands to navigate faster and more efficiently while you are using your computer. But rest assured, you are now back in your Home Directory. In the Terminal window, the cursor will move to the next line with no indication of what happened. Don't worry, in some cases it is very likely.įor example, when you type cd ~, you will be taken back to your Home Directory. If you have never used a terminal before, you may be confused executing a command and nothing happens in the Terminal window. If you want to specify a different location for the command to execute, you will need to use the cd command and the directory path to specify where you want the command to execute. Ĭommands automatically execute in the last used location on your computer. To exit the terminal without using the mouse, type Command + Q.To interrupt a command is running, type Control + C.You can't use the mouse to interact with a Terminal window other than using the three close, expand, and hide buttons in the upper left corner of the window.
Now that you have a basic understanding of how to write and use Terminal commands, there are a few rules to understand. So the command to move a file from your desktop to your Documents file might look like this: mv ~/Desktop/TerminalTestFile.rtf ~/Documents Rules for using Terminal commands And the output will be where you want the file moved. The argument for that command will be the location of the file you want to move. An output modification option : This is an indicator of where the results of a particular command should appear.įor example, if you wanted to move a file, you'd use the mv command.For example, should a cp, or copy command, be copied from one window or another? Arguments : This indicates which resource the command should work on.Be very careful when using Terminal commands, as some commands can delete files or cause other damage to the system, causing the computer to stop working. Command part : These are the actual characters that you will enter into the Terminal window to execute the command.But before you get started, you must know how to write Terminal commands. For example, if you really want to, you can use the Terminal command to get your Mac to talk to you. You can do a lot of cool (and useful) things with Terminal. Once the Terminal window has the desired interface, you can start using it to execute commands on the computer.
In the Profiles dialog box, you can change the look of the command prompt windows to suit your style or needs.
You can also change the look of the application by going to Terminal> Preferences or pressing Command + comma ','.
When the Terminal window opens, you can resize it by dragging one of the corners to expand it. The first result is exactly what you are looking for. There are several options for doing that, but the easiest is to press Command + Space to open Spotlight, then search for "Terminal". Of course, the first step would have to be to open Terminal.