Difference between revisions of "Command-line interface"
Line 27: | Line 27: | ||
Shells/Environments: | Shells/Environments: | ||
'''Command Prompt (cmd.exe):''' The traditional, older CLI environment in Windows, based on the earlier MS-DOS command line. It uses a different set of commands (e.g., dir, copy) and syntax. | '''Command Prompt (cmd.exe):''' The traditional, older CLI environment in Windows, based on the earlier MS-DOS command line. It uses a different set of commands (e.g., dir, copy) and syntax. | ||
− | ''' | + | '''PowerShell:''' A modern and powerful CLI and scripting environment from Microsoft. PowerShell is object-oriented with a different command syntax (using "cmdlets" like Get-ChildItem). It's designed for administration and automation. |
− | ''' | + | '''Windows Subsystem for Linux (WSL):''' This lets you run a Linux environment directly within Windows, giving you access to the standard Linux CLI and utilities alongside Windows apps. |
Foundation: Command Prompt is based on the MS-DOS legacy. PowerShell is a separate framework built on .NET. WSL provides a Linux kernel interface on top of the Windows kernel. | Foundation: Command Prompt is based on the MS-DOS legacy. PowerShell is a separate framework built on .NET. WSL provides a Linux kernel interface on top of the Windows kernel. | ||
Access: Accessed via "Command Prompt," "PowerShell," or specific WSL distribution apps from the Start menu. | Access: Accessed via "Command Prompt," "PowerShell," or specific WSL distribution apps from the Start menu. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
=== See Also === | === See Also === | ||
*[[Graphical user interface]] | *[[Graphical user interface]] | ||
− | |||
− | |||
*[[Secure Shell]] | *[[Secure Shell]] | ||
− | + | [[Category:Information]] | |
− | [[Category: |
Latest revision as of 18:47, 18 June 2025
Contents
Command-Line Interface (CLI)
A Command-Line Interface (CLI) is a text-based way to interact with a computer. Instead of clicking on visual elements like windows, icons, and buttons as in a Graphical User Interface (GUI), you type commands into a text window, and the computer responds with text.
The CLI is a fundamental tool, especially for system administration, software development, and automating tasks. It lets you run programs, manage files, configure settings, and run scripts by typing specific commands.
While the basic idea of typing commands is universal, the specific commands, environment, and typical usage vary significantly across Linux, MacOS, and Microsoft Windows.
CLI in Linux
The CLI is central to how Linux is designed and used. It's a powerful and flexible environment for managing the system, installing software, running servers, and automating tasks with scripts.
Shell: The program that interprets your commands is called a shell. The most common default shell on Linux is Bash, but others like Zsh are also popular. Foundation: Built on a Unix-like base, the Linux CLI uses a consistent set of commands and utilities (like ls, cd, grep). Access: You access it via a terminal emulator program (like GNOME Terminal, Konsole, or remotely using SSH).
CLI in macOS
MacOS has a robust and powerful CLI because its core (Darwin) is based on Unix-like systems. The macOS terminal is very similar to the Linux terminal, with many identical commands.
Shell: The default shell in recent macOS versions is Zsh, though it historically used Bash. Foundation: Based on a certified Unix-like core, providing access to standard Unix commands. Access: Accessed via the built-in "Terminal" application.
CLI in Windows
Microsoft Windows has a different history and foundation for its CLI compared to Linux and macOS. While the GUI is the primary way to interact with Windows, the CLI is vital for system administration, scripting, and troubleshooting.
Shells/Environments: Command Prompt (cmd.exe): The traditional, older CLI environment in Windows, based on the earlier MS-DOS command line. It uses a different set of commands (e.g., dir, copy) and syntax. PowerShell: A modern and powerful CLI and scripting environment from Microsoft. PowerShell is object-oriented with a different command syntax (using "cmdlets" like Get-ChildItem). It's designed for administration and automation. Windows Subsystem for Linux (WSL): This lets you run a Linux environment directly within Windows, giving you access to the standard Linux CLI and utilities alongside Windows apps. Foundation: Command Prompt is based on the MS-DOS legacy. PowerShell is a separate framework built on .NET. WSL provides a Linux kernel interface on top of the Windows kernel. Access: Accessed via "Command Prompt," "PowerShell," or specific WSL distribution apps from the Start menu.