Sometimes, even the simplest tasks can be forgotten if not practiced and repeated. In this short tutorial, I am going to show you some basic command line commands in Microsoft Windows, and their equivalent commands in Apple Mac OS Terminal. This is by no means a complete reference to the available commands, just a short list of some common commands available to you on your operating system. In this post, I will about Windows Command Line (CMD) and Mac OS Terminal Navigation Commands.
- Explore the world of Mac. Check out MacBook Pro, iMac Pro, MacBook Air, iMac, and more. Visit the Apple site to learn, buy, and get support.
- Cmder is not available for Mac but there are some alternatives that runs on macOS with similar functionality. The most popular Mac alternative is PowerShell, which is both free and Open Source.If that doesn't suit you, our users have ranked 36 alternatives to cmder and eight of them are available for Mac so hopefully you can find a suitable replacement.
- This tutorial will teach you how to to run commands from the command line on mac. Check out DevMountain's website: Windows command cheat.
- Shut down your Mac. (Apple menu Shut Down.) Hold down the Command and R keys down and press the Power button. Keep holding Command and R until the Apple.
Apple Mac computer. Shopping for an Apple Mac. Whether you're into graphic design and photography or you're just looking for a reliable computer with the latest technology, an Mac computer gives you the power and efficiency you need. The thin, lightweight MacBook is easy to take anywhere you go, with stunning graphics and efficient battery life.
Knowledge of CMD/Terminal commands may be needed for using command line interfaces (CLI) of applications where Graphical User Interface is missing, or when CLI provides a faster/easier way to perform a task. Let’s see some of the commands
The CMD/Terminal window
To open the CMD window in Microsoft Windows you may follow several ways, one of them being choosing Run option from the start menu, typing “cmd” in run window, and clicking “enter”. This will open the CMD window in Microsoft Windows
- CMD window
Here you will see the version of the Operating System, and the path to the home folder. The white sign in the picture points your current location in the disk. Home folder is the usual starting point when you open CMD window.
In Mac OS you will usually find the Terminal in Other programs folder. When you open the terminal, you will see the name of the current folder. If you want to know the full path to the current folder, you can type pwd and see the full path.
List files and folders
If you want to list files and folders in that directory use:
Here you see the list of directories in my home folder
- Listing files in a directory with dir command in Windows CMD
Move to directory
If you want to change your current directory to another directory, use:
|cd “path to the folder”||cd “path to the folder”|
When you execute the command by pressing “enter” in your keyboard, if the path is correct, you will see that you current folder will change to the new path.
Get back to parent directory
If you want to go one directory up in the directory tree, execute:
and you will see your current directory will change to the parent directory. Please note that in windows two dots are connected to cd, and in MacOS there is a space between cd and dots.
Get to the root
Wherever you are in the directory tree, you can move to the root directory by executing:
This will get you to the disk root of the directory tree.
Create a directory
Creating a new directory is done using
|mkdir MyFolder||mkdir MyFolder|
This will create directory MyFolder in your current directory.
Remove a directory
Removing a directory first requires the directory to be emptied from contents, and then be removed. Removal commands are:
|rmdir MyFolder||rm -r MyFolder|
Rename a directory
Cmd For Apple Macbooks
To rename a directory execute:
|rmdir||mv oldName newName|
Rename a file
To rename a file execute:
|ren oldFileName newFileName||mv oldFileName newFileName|
Delete a file
Run Cmd On Mac
To delete a file exeute:
|del filename||rm -Rf filename|
Delete command does not ask for confirmation, so please be careful.
Check the Path
Command Prompt On Apple Computer
Some programs need to be added to the PATH in order to be accessible through command line interface. If you want to check your current path, you can execute the following command:
|echo %path%||echo “$PATH”|
This will print current path variable and you can check if required programs are added to the path.
I hope this helps.