![]() Once you navigate to your desired directory or folder, you can perform several operations there, everything from creating and editing new directories to and deleting the existing ones. Lastly, when you have to go to the root directory, run: ![]() If you want to go back to the previous working directory or folder: When you want to move to a particular directory or folder: The following is an explanation of how to use it. Once you’ve identified your current working directory and the directory you want to navigate to, the cd command will help you move between directories. To view all the contents of a directory, including the hidden files and directories: Use the following command and its variations to do this effectively: Similarly, you might also need to view the contents of a directory or a folder to identify if it holds the file/directory you want to access. However, before you change directories or folders, it’s important to know your present working directory. You’ll need to perform it when you want to create a new file, move a file between directories, or launch programs within a directory. ![]() ![]() Moving between different directories or folders is one of the basic actions you’ll have to perform to navigate your file system. For instance, if you’ve disabled/enabled some service on your Mac but don’t exactly remember its name or the command you’ve used, you can use this command to find out the service and revert your action. The history command comes in handy when you want to find out all the commands you’ve executed in the past. You’ll need to use it when you want to execute a command that demands superuser access.įor example, if you want to shut down your Mac through Terminal, you’ll need to run:Īnd enter your user password for the command to execute. It gives you administrative (root) privileges to execute actions on macOS. Sudo is the most powerful terminal command. So if you’ve got your Terminal window filled with results from all your previous commands, simply run clear to get a clean slate. clearĪs its name suggests, the clear command clears the shell and gives you a blank window to input your commands. Will give you all the details you need to know about the cd (change directory) command. Using it, you can get more information about a command, such as its description, usage, available options, and variations, among other things. The man command displays a user manual of the command for which you make the query. Basic Terminal Commandsīefore you jump into action-specific Terminal commands, below are some basic commands you should know. Now, all you need to do is type in a terminal command and hit return to execute it.įor your convenience, we’ve classified command line commands into several categories so it’s easier to follow them: 1. Opening up the Terminal window brings up the Mac command prompt which looks like a black box. For this, run Terminal, right-click on its icon in the dock, and select Options > Keep in Dock. Alternatively, you can use the Spotlight search to look for Terminal.Īdditionally, you can also add it to your dock for quick access. macOS already comes equipped with one, and you can find it under Applications > Utilities. Use Your Mac Efficiently With Terminal CommandsĮxecuting commands on any operating system requires a terminal.Installing Programs using Terminal commands
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |