banner



Which Command-line Or Graphical Interface Is Used To Control And Configure A Device?

What is a command-line interface?

A command-line interface (CLI) is a text-based user interface (UI) used to run programs, manage estimator files and collaborate with the computer. Control-line interfaces are also called control-line user interfaces, console user interfaces and character user interfaces. CLIs accept equally input commands that are entered past keyboard; the commands invoked at the control prompt are and so run by the computer.

Today, most vendors offering the graphical user interface (GUI) as the default for operating systems (OSes) such as Windows, Linux and macOS. Nearly electric current Unix-based systems offer both a command-line interface and a graphical user interface.

The MS-DOS operating organisation and the control shell in the Windows operating system are examples of command-line interfaces. In addition, programming language development platforms such every bit Python can back up control-line interfaces.

The command line dropped in popularity post-obit the introduction of GUI-based personal computer OSes like Microsoft Windows and Apple'due south "classic" Mac Os in the 1980s. The command line remains an of import tool for IT professionals, software developers, sys admins, network administrators and many others who prefer a more than precise and reproduceable interface to their systems.

What is a shell?

In calculating, a shell program provides access to an operating organisation'southward components. The shell gives users (or other programs) a mode to get "within" the system to run programs or manage configurations. The shell defines the boundary between inside and outside.

The following are the ii types of operating system shells:

  • CLI-based shells offer users a concise and efficient manner of interacting with the OS, without requiring the overhead of a graphical user interface.
  • GUI-based shells are considered easier for beginners to apply, but they also include a CLI-based shell for system administrators or ability users who prefer to collaborate at a command prompt.

Fustigate is the most normally used command-line crush for Unix-based OSes including Linux.

The software that handles the command-line interface is commonly referred to as a command language interpreter, a command processor or command interpreter. Two well-known CLI shells are PowerShell for Windows and Fustigate for Linux and macOS.

Shells are the outermost layer of the OS and are oft separated from the underlying Os kernel. A shell operates like an awarding and can be replaced as needed. An Os may have more one beat out available, equally in the following examples:

  • Microsoft Windows includes the Command Prompt app as well as the PowerShell application, both of which can be used to interact straight with the reckoner. The Windows Subsystem for Linux as well provides a CLI with access to the underlying organisation.
  • Linux and other Unix-based operating systems usually provide the Bourne-Again Shell (bash) as the default shell. Other shells, including the C beat out, Z beat out and others, can exist configured every bit the default arrangement shell.

Considering the beat is merely one layer in a higher place the OS, users can perform operations that are not available in other interface types, such as moving files within organisation folders and deleting locked files.

To get the greatest do good from using a CLI shell, users should learn a scripting language. Well-nigh command line shells tin save sequences of commands in a script or batch file which may exist fully programmable. Vanquish scripting is the foundation of basic systems management automation.

How do CLIs work?

Once a reckoner system is running, its CLI opens on a bare screen with a control prompt and commands can be entered.

Types of CLI commands include the following:

  • system commands that are encoded equally function of the operating system interface;
  • executable programs that, when successfully invoked, run text-based or graphical applications; and
  • batch programs (or batch files or trounce scripts) which are text files listing a sequence of commands. When successfully invoked, a batch plan runs its commands which may include both system commands and executable programs.

CLI is more than a simple control/response system, equally most have boosted features that make one preferable to another. Some features include the post-obit:

  • Scripting capability enables users to write programs that can be run on the organization from the command line.
  • Control pipes enable users to directly the output of one programme to exist the input for another plan ("piping" the flow of data).
  • System variables tin be set at the control line, or the values of those variables displayed.
  • Control history features enable the user to call back previous commands issued. Some save command history for the session (similar PowerShell), others tin exist configured to store session history for longer (like bash).

Commands and syntax for CLIs tend to be very stable over time, in office to enable astern compatibility for scripts.

Prompts and commands

Depending on the operating arrangement and the CLI, at that place may be hundreds or even thousands of different executable commands available. The set of commands may vary dramatically between operating systems or applications.

For case, Microsoft defines hundreds of cmdlets as "lightweight commands" to be used in PowerShell; PowerShell functions are lists of cmdlets that can be run at the command line.

Some commands run at the command line by themselves, such as the dir command:

C:\> dir

Commands can likewise exist used with arguments (sometimes referred to as parameters) that modify how the command should exist run. Arguments follow the command and provide boosted details or specifics.

The cd "change directory" command in many CLIs is used to change the current working directory when the desired new directory path is included as an argument -- but in some cases (equally in MS-DOS or the Windows command prompt) the command by itself returns the current working directory.

This command resets the current working directory:

cd \documents\user\working

Arguments enable command-line users to get very specific results that are sometimes non available through a graphical interface.

Modernistic CLIs provide pipes, or mechanisms for taking the output of one command and sending it as input to some other command. The vertical bar, or "|" symbol, is frequently used for this purpose.

The following "one-liner" uses pipes to string together several PowerShell commands to retrieve detailed network configuration information from a Windows automobile:

Go-NetIPAddress | Sort InterfaceIndex | FT InterfaceIndex, InterfaceAlias, AddressFamily, IPAddress

Even though this cord is entered at the command line as if it were a unmarried control, it includes the following consecutive commands:

  • Go-NetIPAddress retrieves all IP configuration information for the computer when entered without any arguments.
  • Sort InterfaceIndex accepts as input the output of the Get-NetIPAddress cmdlet and sorts it by the InterfaceIndex value associated with each IP address included in the calculator configuration.
  • FT InterfaceIndex, InterfaceAlias, AddressFamily, IPAddress uses the Format-Table (FT) command to format the sorted output of the previous command and displays the specified values for each IP address.

Backward compatibility is often a goal when new CLIs are introduced to replace existing CLIs, every bit when Microsoft replaced MS-DOS with the Windows Command Prompt. Though some MS-DOS commands are no longer supported, most will nevertheless work in PowerShell as originally intended.

Common MS-DOS commands include the post-obit:

Command Case Notes
CD C:\> CD \user\programs
C:\user\programs>
Changes the current directory to the specified path. When entered with no path, it displays the electric current working directory'southward proper name. If the path is included in the command prompt, the prompt volition alter equally in the instance (see also PROMPT, below).
CHKDSK C:\> CHKDSK a: Checks the specified disk -- in this case, the floppy disk in the A: drive -- and returns a status report showing the disk size, number of files and directories in use and number of bytes used.
COPY C:\> COPY autoexec.bat autoexec.BAK Copies specified file or files. Tin be used to copy files to duplicates with different file names or to copy files into a different directory without changing names.
DEL C:\> DEL autoexec.BAK
C:\> DEL C:\backups\*.BAK
Deletes a file or files. Can be used to delete files in the electric current working directory or in some other directory. Tin also be used with wildcard characters to delete groups of files.
DIR C:\> DIR
C:\> DIR c:\backups\*.txt
Displays all contents -- files and directories -- in the specified directory. If no directory is specified, it refers to the contents of the current directory. It can also be used with wildcard characters to display only specific files.
EDLIN C:\> edlin autoexec.bat Starts edlin, a line editor that can exist used to edit text files. In this example, information technology is existence used to edit the autoexec.bat file.
FORMAT C:\> FORMAT a: Formats a disk so it can be used with MS-DOS.
MKDIR C:\> MKDIR c:\NewDIR Creates a new directory in the specified path.
More than C:\> MORE autoexec.bat Displays contents of a file, one screen at a time. It is more often than not used for text files.
PROMPT C:\> prompt $p $d$k
C:\UTIL Fri 11-05-2021>
Modifies the default prompt. In this example, parameters are used with the command to ready the prompt display every bit the electric current drive and path, the mean solar day and engagement and the greater-than symbol. The resulting prompt is shown in the example.
RMDIR C:\> rmdir c:\fill-in Removes a directory.
Type C:\> type autoexec.bat Displays content of a text file, without page breaks.

CLI versus GUI

The graphical user interface is the about pop user interface today. A GUI uses windows, menus and icons to execute commands. Using a mouse is the most common way to navigate through a GUI, although many GUIs allow some navigation and program execution via a keyboard.

Microsoft Word is an example of a GUI-based application. A user can alter options for page layouts and styles by selecting the corresponding icon or pull-down menu with a mouse or keyboard.

a PowerShell command line
An case of output from the PowerShell command line

One advantage of a GUI is the interface tin can visually display bachelor functions. Even so, because it relies on graphical display, a GUI may non have the same level of functionality and granular command every bit a command-line interface. For example, it can require numerous clicks and move through several dialog boxes in a GUI to achieve the same issue as a single command line.

In addition, GUIs do not readily support scripting or automation. For common tasks, a user must repeat each click or navigate each dialog inside the GUI manually.

System administrators who may need to manage hundreds -- or hundreds of thousands -- of systems and configurations will detect a GUI far less efficient than a CLI. A simple CLI command can easily adjust configurations for a large group of systems at once.

Commands and arguments can also be combined and saved, then executed as a script each time that specific action -- or comprehensive set of actions -- is required. The CLI is the preferred tool for many enterprise-wide systems management tasks.

an example of the Windows 11 graphical user interface
Windows 11 GUI: The Start menu

CLI advantages and disadvantages

The following are advantages of a control-line interface:

  • granular control of an OS or application;
  • more than efficient management of a large number of systems;
  • power to store scripts to automate regular tasks; and
  • basic command-line interface knowledge can enable troubleshooting of network connexion issues or resolving other system tasks.

The disadvantages of a command-line interface are the following:

  • GUI is more user friendly;
  • steeper learning curve associated with memorizing commands and complex syntax/arguments; and
  • different commands used in unlike shells.

The control line is a great place to become an skilful at using a figurer. Once you lot're ready, it'due south also the simply place to learn how to write shell scripts .

This was last updated in December 2021

Continue Reading Nearly command-line interface (CLI)

  • Work a command-line interface in Linux with these permissions and prompts
  • Advanced shell scripting for IT ops professionals: Free chapter
  • PowerShell vs. Bash: Central differences for Windows deployments
  • When and how to use the AWS Control Line Interface
  • These It automation scripts take picayune effort and save a lot of piece of work

Dig Deeper on It operations and infrastructure direction

  • fustigate (Bourne again vanquish)

    Past: Peter Loshin

  • MS-DOS (Microsoft Deejay Operating System)

    By: Peter Loshin

  • Boot2Docker

    By: Jack Wallen

  • shell script

    Past: TechTarget Contributor

Which Command-line Or Graphical Interface Is Used To Control And Configure A Device?,

Source: https://www.techtarget.com/searchwindowsserver/definition/command-line-interface-CLI

Posted by: becerrasude1962.blogspot.com

0 Response to "Which Command-line Or Graphical Interface Is Used To Control And Configure A Device?"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel