How do you open the command line interface on your system?
Each major operating system has a slightly different way of access the command line interface (CLI).
Windows
Here is how you open the CLI in Windows on Windows 8 or beyond:
- Press the Windows key and “S”
- Type “cmd” into the search field
- Right-click “Command Prompt” and select “Run as Administrator”
- You can now enter a command prompt
Mac
Here is how you open the CLI on Mac:
- Locate the Finder application, which is usually on your toolbar
- Move through /Applications/Utilities
- Select “Terminal”
- You can now enter a command prompt
Linux
Linux has a simple way of accessing the CLI: use the shortcut CTRL+ALT+T.
Alternatively, you can use ALT+F2 and then enter “gnome-terminal.”
What are some common command line interface commands?
A command line interface (CLI) has many different commands for different types of tasks. The commands vary slightly between operating systems. We give several different command examples next.
File system commands
CLI command | Windows | Linux |
Change directory | cd | cd |
Last files | dir | ls |
Create directory | mkdir | mkdir |
Remove directory | rmdir | rmdir |
Copy files | copy | cp |
Move files | move | mv |
Remane files | ren | mv |
Display files | type | cat |
Delete files | del | rm |
Change personmissions | cacls/chmod | chmod |
Network commands
CLI command | Windows | Linux |
Ping | ping | ping |
Traceroute | tracert | traceroute |
Network config | ipconfig | ifconfig |
Route table | route | route |
DNS lookup | nslookup | nslookup |
Network diagnostics | netsh | netstat |
Information commands
CLI command | Windows | Linux |
List processes | tasklist | ps |
End process | taskkill | kill |
System info | systeminfo | uname -a |
Disk usage | wmic/fsutil | df |
System monitoring | perfmon | top/htop |