Command line quick start
A shell is a program that enables you to interact with your computer's operating system. With a command-line shell, you use alphanumeric commands to input instructions, which the computer processes immediately.
Common command-line shells are Terminal for Mac and Command Prompt and PowerShell for Windows.
Before you can use the shell commands described on the File lists and Folder trees pages, you need to open a shell at the appropriate location on your computer. Choose a set of instructions below to get started.
Mac
Starting in Finder
- In Finder, navigate to the top-level directory (folder) you want to view.
- Select the folder.
- Press Control while clicking the folder; then choose New Terminal at Folder.
- In Terminal, notice that the command line indicates your chosen location.
- Type a command.
Starting in Terminal
- Open the Terminal application.
- On the command line, type
cd
and the path name—for example, cd /Users/abc/Documents
(To get the path name, see Copy a Mac path name below.)
- Notice that the command line indicates your chosen location.
- Type a command.
Copy a Mac path name
Go to Finder and select the folder you want to interact with in the shell. Then choose one of these options:
- Press Control while clicking the path at the bottom of the window; then choose Copy [file/folder name] as Pathname. Paste the path on the command line.
- Drag the folder from Finder to the Terminal window. The path is copied to the command line.
For more information, see the Apple documentation.
Windows
PowerShell
Starting in File Explorer
- In File Explorer, navigate to the top-level directory (folder) you want to view.
- Select the folder.
- Choose one of these options:
- Press Shift and right-click; then choose Open PowerShell window here.
- Go to the File menu; then choose Open Windows PowerShell.
- In the location bar, select the file path; type powershell; and press Enter.
- In PowerShell, notice that the command line indicates your chosen location.
- Type a command.
Starting in PowerShell
- Open the PowerShell application.
- On the command line, type
cd
and the path name—for example, cd "C:\Users\abc\Documents"
(To get the path name, see Copy a Windows path name below.)
- Notice that the command line indicates your chosen location.
- Type a command.
For more information, see the Microsoft documentation.
Command Prompt
Starting in File Explorer
- In File Explorer, navigate to the top-level directory (folder) you want to view.
- Select the folder.
- In the location bar, select the file path; type cmd; and press Enter.
- In Command Prompt, notice that the command line indicates your chosen location.
- Type a command.
Starting in Command Prompt
- Open the Command Prompt application.
- On the command line, type
cd
and the path name—for example, cd "C:\Users\abc\Documents"
(To get the path name, see Copy a Windows path name below.)
- Notice that the command line indicates your chosen location.
- Type a command.
For more information, see the Dell knowledge base article.
Copy a Windows path name
To get the path name, go to File Explorer and select the folder you want to view. Then choose one of these options:
- Go to Home and select Copy path. Then paste the path on the command line.
- Drag the folder from File Explorer to the shell window. The path is copied to the command line.