How do I change directories in Terminal on a Mac? – use command

The hosting address of the file we entered on the Mac computer, is predefined because the system is created by the developer, which means these help keep everything more organized. We can avoid mistakes and confusion by ordering in the storage structure, the addresses have specific names that we are very familiar with.

Get the directory using the terminal

these known directories e.g. Documents, Images, Desktop, etc. are very usefulbecause with these we can find the route to follow to get the file we want to use, e.g. search in Apple Mail for the file to attach. Now by executing commands through the terminal, we can modify this directory or path and assign what we want; making our access more precise in this way, let’s see.

How to view directory contents in Mac Terminal?

Directories in operating systems and Macs are no exception, as the name suggests, they provide us with a bone address, a place where the data in it is stored, to see what is in the address or route from the terminal, Some commands need to be entered. These commands do not open a popup, but show us what it contains in the same terminal.We can even see hidden files or folders here

To continue, we open the terminal, it will be in the users section, and we enter the command «password», e.g. «image password» We will see the established route, which is «user/image». Knowing this, we can see what it contains by typing «ls», «images ls», which will display everything entered in that folder; in these examples, we will see in the terminal each The full name of the file and its directory.

How do I change directories in Terminal on a Mac computer?

If you want to change the address and position yourself in a different location to be able to access another directory, we can do it by entering the command from the system terminal We can also achieve it using system configurationif we want to change where we are from the terminal, we can also use the command and move to where we want to go.

From the mac terminal you can access the directory

When we’re going to buy a Mac computer online or in a brick and mortar store, it’s pre-designed to provide the user with a comfortable experience, which tells us: System architecture is as it should beso this makes it clear to us that the predefined locations have fixed routes that we can easily access, let’s see how it’s done.

by command

To change from the current location to another, we will use «CD» command means change directory or change directory To do this we do the following in case we want to change from the image location to the desktop, in the terminal we type «dc desktop» which will take us to the desktop location. In the same way we can enter the command «LS» to know what it contains and to know its full path, we enter «PWD».

from system settings

To do this from the system settings we must first access the settings, this is done Type in the top right corner of the apple symbolthen we are in the second option «System Preferences» where we will find a window with different options distributed.

Here we enter the user and we will find all the folders it contains, when one is selected the address will be displayed at the top, e.g. «Users/Desktop» To change the location of the desktop to another address, you must replace the word «desktop» with «image». This option is useful if you decide to enter addresses quickly to eliminate duplicate images.

Find any directory with command

What is the way to go back from a directory via the command line?

If you need to go back to the previous directory from the terminal, via the command line, it’s as easy as doing as explained above.If you are in the image and move to the desktop position and want to return to the desktop, you must Enter the command «CD» in the terminal, that is, «cd ~/image» In this way, you will return to the main location.

This is a generic way of inspecting and modifying files from the terminal, without using the traditional way as it would give us more work We manage to have a comprehensive and accurate view of all documents and how they are organized.

Deja un comentario