Command Line: This is the actual line in a console where you type your command. Prompt: This is the beginning of the command line. It usually provides some contextual information like who you are, where you are and other useful info. It typically ends in a $. After the prompt is where you will be typing commands.
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.
Command key: Command (or Cmd) Like the Control key on Windows/PC. Formerly known as the Apple key. Option key: Option (like Alt on Windows/PC) Shift key: Shift: Control key: Control (Control-click = Right-click) Tab key: Tab: Return key: Return: Enter key: Enter (on Number Pad, or fn-Return on compact keyboards) Eject key: Eject: Escape key: Escape: Page Up key. Aug 20, 2019 If you’re a long-time Mac user transitioning to a Windows keyboard, the Windows key, which is equivalent to the Mac's Command key, occupies the physical position of the Option key on a Mac keyboard. Likewise, the Windows keyboard's Alt key is where you expect to find the Mac's Command key. If you're used to using the modifier keys from your old Mac keyboard, you're likely to run into trouble.
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:
WINDOWS | MAC OS |
---|---|
dir | ls |
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:
WINDOWS | MAC OS |
---|---|
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:
WINDOWS | MAC OS |
---|---|
cd.. | cd .. |
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:
WINDOWS | MAC OS |
---|---|
cd | cd / |
This will get you to the disk root of the directory tree.
Create a directory
Creating a new directory is done using
WINDOWS | MAC OS |
---|---|
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:
WINDOWS | MAC OS |
---|---|
rmdir MyFolder | rm -r MyFolder |
Rename a directory
To rename a directory execute:
WINDOWS | MAC OS |
---|---|
rmdir | mv oldName newName |
Rename a file
To rename a file execute:
WINDOWS | MAC OS |
---|---|
ren oldFileName newFileName | mv oldFileName newFileName |
![Commands For Mac Commands For Mac](/uploads/1/3/4/0/134049460/771264723.png)
Delete a file
To delete a file exeute:
WINDOWS | MAC OS |
---|---|
del filename | rm -Rf filename |
Delete command does not ask for confirmation, so please be careful.
Check the Path
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:
WINDOWS | MAC OS |
---|---|
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.
I hope this helps.
MacBook owners have a number of tools that come in very handy for using their laptops efficiently and for maintaining the operating system to keep it running in top shape. These MacBook keyboard shortcuts for the Finder, a maintenance checklist, and a “translation” of the modifier keys will speed you on your way to becoming a MacBook power user.
Mac OS X Finder Keyboard Shortcuts
The Mac OS X Lion Finder helps you access and organize most of the important Mac OS X functions while you work. Use Finder keyboard shortcuts to display windows, copy and move files, and launch applications. These keyboard shortcuts help you get things done more efficiently.
Key | Function |
---|---|
Command+A | Selects all items in the active window (icon view), all items in the column (column view), or all items in the list (cover flow view) |
Command+C | Copies selected items |
Command+D | Duplicates the selected item(s) |
Command+E | Ejects the selected volume |
Command+F | Displays the Find dialog |
Command+H | Hides All Finder windows |
Command+I | Shows info for selected item or items |
Command+J | Shows the view options for the active window |
Command+K | Displays the Connect to Server dialog |
Command+L | Creates an alias for the selected item |
Command+M | Minimizes the active window |
Command+N | Opens a new Finder window |
Command+O | Opens (or launches) the selected item |
Command+R | Shows the original for selected alias |
Command+T | Adds the selected item to the Sidebar |
Command+V | Pastes items from the Clipboard |
Command+W | Closes the active window |
Command+X | Cuts the selected items |
Command+Z | Undoes the last action (if possible) |
Command+, | Displays Finder Preferences |
Command+1 | Shows the active window in icon mode |
Command+2 | Shows the active window in list mode |
Command+3 | Shows the active window in column mode |
Command+4 | Shows the active window in cover flow mode |
Command+[ | Moves back to the previous Finder location |
Command+] | Moves forward to the next Finder location |
Command+Del | Moves selected items to the Trash |
Command+up-arrow | Show enclosing folder |
Command+` | Cycles through windows |
Command+? | Displays the Mac OS X Help Viewer |
Command+Shift+A | Takes you to your Applications folder |
Command+Shift+C | Takes you to the top-level Computer location |
Command+Shift+G | Takes you to a folder that you specify |
Command+Shift+H | Takes you to your Home folder |
Command+Shift+I | Connects you to your iDisk |
Command+Shift+Q | Logs you out |
Command+Shift+N | Creates a new untitled folder in the active window |
Command+Shift+U | Takes you to your Utilities folder |
Command+Shift+Del | Deletes the contents of the Trash |
Command+Option+H | Hides all windows except the Finder’s window(s) |
Command+Option+N | Creates a new Smart Folder |
Command+Option+T | Hides the Finder window toolbar |
Command+Option+Space | Opens the Spotlight window |
Command+Space | Opens the Spotlight menu |
F8 | Choose another desktop using Spaces |
Control+up-arrow (or F3, depending on your keyboard model) | Displays the Mission Control screen |
Control+down-arrow (or Control+F3, depending on your keyboard model) | Shows all open windows for the current application using Mission Control |
F11 (or Command+F3, depending on your keyboard model) | Hides all windows to display the Desktop using Mission Control |
F12 (or F4, depending on your keyboard model) | Displays your Dashboard widgets |
Space | Quick Look |
Strange-Looking Keys on the MacBook Keyboard
Commands For Mac Computers
New to the Macintosh world? Some keys on the MacBook keyboard may be mystifying. Whether you’re using Snow Leopard or an older version of Mac OS X, recognizing and using modifier keys will make your job easier. Here’s a look at the modifier keys on both MacBook and desktop keyboards:
Mac OS X Maintenance Checklist
![For For](/uploads/1/3/4/0/134049460/187422066.jpg)
Keyboard Commands For Mac
Maintenance is vital if you want to keep Mac OS X Lion in tip-top condition for as long as possible. Maintaining your MacBook keeps it running fast and smooth. Basic housekeeping includes regular back-ups plus some other, less familiar, tasks. Check this table often, or print it and keep a copy near your laptop!
Mac Maintenance Task | Schedule |
---|---|
Check for updates with Software Update | Once a day (automatic setting) |
Back up with Time Machine | Automatic |
Defragment (Micromat TechTool Pro/Prosoft Engineering Drive Genius 3) | Once a week |
Repair Disk Permissions (Disk Utility) | Once a week |
Delete Unnecessary User Accounts (System Preferences) | As necessary |
Scan for viruses (Intego VirusBarrier X6, ClamXav 2) | Automatic |
Check all volumes (Disk Utility/ Micromat TechTool Pro) | Once a week |
Check for the latest drivers for your hardware | Once a month (or after installing new hardware) |
Delete temporary Internet cache files (Prosoft Engineering Drive Genius 3) | Once a month |