Using the Windows terminal (popularly known as the Command Prompt) and Linux is a common task for users of these systems because the available commands are very useful on many occasions. The Mac and Macbook also have a command terminal, but most users of Apple computers have some fear and tend to be afraid of doing something wrong with the software. It turns out that the Mac Terminal is there to make it easier to use the device and can be used to your advantage in any situation.
To use it, simply search for “Terminal” in Spotlight search. Pretty simple, is not 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 name of the directory (without the quotation marks) in question next to the command before pressing Enter.
This command helps you to go one level above the directory you are currently using.
By placing this command with nothing written next, you will be taken to the directory you are currently using.
This command causes the path of the directory used to be displayed in the Terminal.
6. mkdir “directory name”
To create a new directory, use this command and place the directory name next (without using the quotation marks).
7. rmdir “directory name”
Use this command to delete an empty directory. Just put the name of the directory (without quotation marks) in question next to the command before pressing Enter.
This simple command helps you to copy one or more files quickly. Just put the filename next to the command before pressing 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 the two previously selected files.
11. more “filename”
This command displays a text file on one page at a time. In 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 place file.
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 so that the current date and time is displayed directly in the Terminal.
The “echo” command is used so that anything after it is repeated one more time.
When you type “help” in the Terminal, a small list of useful commands will appear on the screen.
The “history” command can be very useful since it displays the last commands that were typed in the Terminal.
This command opens a simple text editor if you need one.
This simple command is used to view all processes and operations that are currently active.
This command is to allow you to perform certain tasks that your account does not have permission to do. You will still need to enter the administrator password.
23. Defaults write com.apple.finder AppleShowAllFiles TRUE
This slightly larger command is used for all hidden files on your Mac to display normally. To disable this, just change TRUE to FALSE at the end of the command.
24. Defaults write com.apple.screencapture type extension-file
Overall, Mac prints are saved in PNG format, but you can change that with the above command. Simply change the “file-extension” to the extension of the file type that wants the photos to be saved. Put 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, since it only serves to make the Mac speak some words.
26. Defaults write com.apple.dashboard devmode YES
This command serves to place the Mac panel widgets directly on the desktop of the computer. To reverse this, simply change YES to NO at the end of the command.
This command can be extremely useful as it displays the used and free memory of your Mac.
This command is to prevent your 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 activate specifically at another time or day.
This command simply serves to clear the Terminal screen. Very useful if you have been using the software for some time.
Use this command to display and use a calculator quickly.
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 so that free hard drive storage is displayed 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 your 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 the Spotlight search quickly and do a search there.
This command simply serves to open a file, folder, URL or application on your Mac. Just specify the name of what you want to open next to the command before pressing Enter.
This command can be used to modify the password of one of the Mac users in question.
Use this command to do a quick check of your internet connection. It can be very useful if you notice a slowdown in the network.
If you need help, have doubts or concerns, do not hesitate to leave a comment in the comment box below and we will try to help you as soon as possible!