The 44 Most Useful Commands to Use on Mac Terminal
Using the Windows terminal (popularly known as Command Prompt) and Linux is a common task for users of these systems, as the available commands are very useful on many occasions. The Mac and Macbook also have a command terminal, but most users of Apple computers are somewhat afraid and tend to be afraid of doing something wrong with the software. Turns out Mac Terminal is there for easy device use and can be used to your advantage in any situation.
To use it, just search for “Terminal” in Spotlight search. Very simple, isn't it ?! If you want to make good use of this tool, you can still check out some of the most useful commands below!
This command lists the file names of the directory you are currently using.
2. cd “directory name”
Use this command to change a directory. Just put the directory name (without the quotes) in question next to the command before hitting Enter.
3. cd ..
This command helps you go one level higher than the directory you are currently using.
By placing this command with nothing written next to it, you will be taken to the directory you are currently using.
This command causes the directory path used to be displayed in Terminal.
6. mkdir “directory name”
To create a new directory, use this command and enter the directory name immediately (without using quotation marks).
7. rmdir “directory name”
Use this command to delete an empty directory. Just put the directory name (without quotes) in question next to the command before hitting Enter.
This simple command helps you copy one or more files quickly. Just put the filename next to the command before hitting Enter.
If you want to change the access permissions of one of your files, just use this command.
This command will compare the differences between two previously selected files.
11. more “filename”
This command displays one text file on one page at a time. In this case, you must press the space key to see the next page or the Q key to exit the display screen.
12. mv “filename”
This command helps you easily rename a file. You can also use it to move the file in place.
14. rm “filename”
This command is very simple and only serves to delete the file you name.
15. Control + C
This command simply terminates most operations being performed.
Enter this command to have the current date and time displayed directly in Terminal.
The "echo" command is for anything after it to be repeated once more.
When you type "help" in Terminal, a short list of useful commands will appear on the screen.
The "history" command can be very useful as it displays the last commands that were typed in Terminal.
This command opens a simple text editor if you need one.
This simple command is for displaying all currently active processes and operations.
This command is to allow you to perform certain tasks that your account does not have permission for. Still, you will need to enter the administrator password.
23. defaults write com.apple.finder AppleShowAllFiles TRUE
This slightly larger command is for all hidden files on your Mac to display normally. To disable this, simply change TRUE to FALSE at the end of the command.
24. defaults write com.apple.screencapture type extension-file
In general, Mac prints are saved in PNG format, but you can change this with the command above. Just replace the "file extension" with the extension of the file type you want the photos to be saved to. Enter only the three letters of the extension, such as JPG or PDF, depending on what you want to use.
25. say Hello World!
This command is funnier than useful as it only serves to make the Mac speak a few words.
26. defaults write com.apple.dashboard devmode YES
This command is for placing the widescreen widgets directly on your computer desktop. To reverse this, simply replace YES with a NO at the end of the command.
This command can be extremely useful as it displays the free and used memory of your Mac.
This command is to prevent the Mac from going into hibernation or sleep mode when not in use for some time.
This simple command shows the Mac calendar automatically.
With this command, you can program another command to be activated specifically at another time or day.
This command is simply to clear the Terminal screen. Very useful if you have been using the software for a while.
Use this command to quickly display and use a calculator.
This command basically serves to transfer information from one server to another.
Use this command to split a file into several parts.
Use this command to display free hard disk storage on the screen.
This command can be used to copy selected files and folders.
This command is used to allow root access on the computer. Use it with caution.
This command indicates the last user to log in to the Mac in question.
39. locate “filename”
This command can be used to find miscellaneous files on the computer. Just put the file name next to the command.
Use this command to print a previously selected file.
You can use this command to open Spotlight search quickly and do a search there.
This command is simply for opening a file, folder, URL, or application on your Mac. Just specify the name of what you want to open next to the command before hitting Enter.
This command can be used to modify the password of one of the Mac users in question.
Use this command to quickly check your internet connection. It can be very useful if you notice a slow network.
Did you like these tips about Mac Terminal?
Can you take advantage of this full list of tips on useful Mac Terminal commands? Don't forget to leave your comment telling us what you think and it all worked out.