Search This Blog

Friday, July 28, 2023

Command-line interface

From Wikipedia, the free encyclopedia
Screenshot of a sample Bash session in GNOME Terminal 3, Fedora 15
Screenshot of Windows PowerShell 1.0, running on Windows Vista

A command-line interface (CLI) is a means of interacting with a device or computer program with commands from a user or client, and responses from the device or program, in the form of lines of text. Such access was first provided by computer terminals starting in the mid-1960s. This provided an interactive environment not available with punched cards or other input methods.

Operating system command-line interfaces are often implemented with command-line interpreters or command-line processors. Programs with command-line interfaces are generally easier to automate via scripting. Many software systems implement command-line interfaces for control and operation. This includes programming environments and utility programs.

Today, many users rely upon graphical user interfaces and menu-driven interactions. However, some programming and maintenance tasks may not have a graphical user interface and use a command line. Alternatives to the command-line interface include text-based user interface menus (for example, IBM AIX SMIT), keyboard shortcuts, and various desktop metaphors centered on the pointer (usually controlled with a mouse). Examples of this include the Microsoft Windows, DOS Shell, and Mouse Systems PowerPanel. Command-line interfaces are often implemented in terminal devices that are also capable of screen-oriented text-based user interfaces that use cursor addressing to place symbols on a display screen.

Comparison to graphical user interfaces

A graphical user interface with icons and windows (GEM 1.1 Desktop)

Compared with a graphical user interface, a command-line interface requires fewer system resources to implement. Since options to commands are given in a few characters in each command line, an experienced user often finds the options easier to access. Automation of repetitive tasks is simplified by line editing and history mechanisms for storing frequently used sequences; this may extend to a scripting language that can take parameters and variable options. A command-line history can be kept, allowing review or repetition of commands.

A command-line system may require paper or online manuals for the user's reference, although often a "help" option provides a concise review of the options of a command. The command-line environment may not provide graphical enhancements such as different fonts or extended edit windows found in a GUI. It may be difficult for a new user to become familiar with all the commands and options available, compared with the icons and drop-down menus of a graphical user interface, without reference to manuals.

Types

Operating system command-line interfaces

Apple Computer's CommandShell in A/UX 3.0.1

Operating system (OS) command-line interfaces are usually distinct programs supplied with the operating system. A program that implements such a text interface is often called a command-line interpreter, command processor or shell.

Examples of command-line interpreters include DEC's DIGITAL Command Language (DCL) in OpenVMS and RSX-11, the various Unix shells (sh, ksh, csh, tcsh, zsh, Bash, etc.), CP/M's CCP, DOS' COMMAND.COM, as well as the OS/2 and the Windows CMD.EXE programs, the latter groups being based heavily on DEC's RSX-11 and RSTS CLIs. Under most operating systems, it is possible to replace the default shell program with alternatives; examples include 4DOS for DOS, 4OS2 for OS/2, and 4NT / Take Command for Windows.

Although the term 'shell' is often used to describe a command-line interpreter, strictly speaking, a 'shell' can be any program that constitutes the user-interface, including fully graphically oriented ones. For example, the default Windows GUI is a shell program named EXPLORER.EXE, as defined in the SHELL=EXPLORER.EXE line in the WIN.INI configuration file. These programs are shells, but not CLIs.

Application command-line interfaces

GNU Octave's GUI with command-line interface

Application programs (as opposed to operating systems) may also have command-line interfaces.

An application program may support none, any, or all of these three major types of command-line interface mechanisms:

  • Parameters: Most command-line interfaces support a means to pass additional information to a program when it is launched.
  • Interactive command-line sessions: After launch, a program may provide an operator with an independent means to enter commands.
  • Inter-process communication: Most operating systems support means of inter-process communication (for example, standard streams or named pipes). Command lines from client processes may be redirected to a CLI program by one of these methods.

Some applications support a CLI, presenting their own prompt to the user and accepting command lines. Other programs support both a CLI and a GUI. In some cases, a GUI is simply a wrapper around a separate CLI executable file. In other cases, a program may provide a CLI as an optional alternative to its GUI. CLIs and GUIs often support different functionality. For example, all features of MATLAB, a numerical analysis computer program, are available via the CLI, whereas the MATLAB GUI exposes only a subset of features.

In Colossal Cave Adventure from 1975, the user uses a CLI to enter one or two words to explore a cave system.

History

The command-line interface evolved from a form of communication conducted by people over teleprinter (TTY) machines. Sometimes these involved sending an order or a confirmation using telex. Early computer systems often used teleprinter as the means of interaction with an operator.

The mechanical teleprinter was replaced by a "glass tty", a keyboard and screen emulating the teleprinter. "Smart" terminals permitted additional functions, such as cursor movement over the entire screen, or local editing of data on the terminal for transmission to the computer. As the microcomputer revolution replaced the traditional – minicomputer + terminals – time sharing architecture, hardware terminals were replaced by terminal emulators — PC software that interpreted terminal signals sent through the PC's serial ports. These were typically used to interface an organization's new PC's with their existing mini- or mainframe computers, or to connect PC to PC. Some of these PCs were running Bulletin Board System software.

Early operating system CLIs were implemented as part of resident monitor programs, and could not easily be replaced. The first implementation of the shell as a replaceable component was part of the Multics time-sharing operating system. In 1964, MIT Computation Center staff member Louis Pouzin developed the RUNCOM tool for executing command scripts while allowing argument substitution. Pouzin coined the term "shell" to describe the technique of using commands like a programming language, and wrote a paper about how to implement the idea in the Multics operating system. Pouzin returned to his native France in 1965, and the first Multics shell was developed by Glenda Schroeder.

Bourne shell interaction on Version 7 Unix

The first Unix shell, the V6 shell, was developed by Ken Thompson in 1971 at Bell Labs and was modeled after Schroeder's Multics shell. The Bourne shell was introduced in 1977 as a replacement for the V6 shell. Although it is used as an interactive command interpreter, it was also intended as a scripting language and contains most of the features that are commonly considered to produce structured programs. The Bourne shell led to the development of the KornShell (ksh), Almquist shell (ash), and the popular Bourne-again shell (or Bash).

Early microcomputers themselves were based on a command-line interface such as CP/M, DOS or AppleSoft BASIC. During the 1980s and 1990s, the introduction of the Apple Macintosh and of Microsoft Windows on PCs saw the command line interface as the primary user interface replaced by the Graphical User Interface. The command line remained available as an alternative user interface, often used by system administrators and other advanced users for system administration, computer programming and batch processing.

In November 2006, Microsoft released version 1.0 of Windows PowerShell (formerly codenamed Monad), which combined features of traditional Unix shells with their proprietary object-oriented .NET Framework. MinGW and Cygwin are open-source packages for Windows that offer a Unix-like CLI. Microsoft provides MKS Inc.'s ksh implementation MKS Korn shell for Windows through their Services for UNIX add-on.

Since 2001, the Macintosh operating system macOS has been based on a Unix-like operating system called Darwin. On these computers, users can access a Unix-like command-line interface by running the terminal emulator program called Terminal, which is found in the Utilities sub-folder of the Applications folder, or by remotely logging into the machine using ssh. Z shell is the default shell for macOS; Bash, tcsh, and the KornShell are also provided. Before macOS Catalina, Bash was the default.

Usage

A CLI is used whenever a large vocabulary of commands or queries, coupled with a wide (or arbitrary) range of options, can be entered more rapidly as text than with a pure GUI. This is typically the case with operating system command shells. CLIs are also used by systems with insufficient resources to support a graphical user interface. Some computer language systems (such as Python, Forth, LISP, Rexx, and many dialects of BASIC) provide an interactive command-line mode to allow for rapid evaluation of code.

CLIs are often used by programmers and system administrators, in engineering and scientific environments, and by technically advanced personal computer users. CLIs are also popular among people with visual disabilities since the commands and responses can be displayed using refreshable Braille displays.

Anatomy of a shell CLI

The general pattern of a command line interface is:

Prompt command param1 param2 param3 … paramN
  • Prompt — generated by the program to provide context for the user.
  • Command — provided by the user. Commands are usually one of three classes:
    1. Internal commands are recognized and processed by the command line interpreter.
    2. Included commands run separate executables.
    3. External commands run executable files that may be included by other parties.
  • param1 …paramN — parameters provided by the user. The format and meaning of the parameters depends upon the command. In the case of Included or External commands, the values of the parameters are delivered to the program as it is launched by the OS. Parameters may be either Arguments or Options.

In this format, the delimiters between command-line elements are whitespace characters and the end-of-line delimiter is the newline delimiter. This is a widely used (but not universal) convention.

A CLI can generally be considered as consisting of syntax and semantics. The syntax is the grammar that all commands must follow. In the case of operating systems, DOS and Unix each define their own set of rules that all commands must follow. In the case of embedded systems, each vendor, such as Nortel, Juniper Networks or Cisco Systems, defines their own proprietary set of rules. These rules also dictate how a user navigates through the system of commands. The semantics define what sort of operations are possible, on what sort of data these operations can be performed, and how the grammar represents these operations and data—the symbolic meaning in the syntax.

Two different CLIs may agree on either syntax or semantics, but it is only when they agree on both that they can be considered sufficiently similar to allow users to use both CLIs without needing to learn anything, as well as to enable re-use of scripts.

A simple CLI will display a prompt, accept a "command line" typed by the user terminated by the Enter key, then execute the specified command and provide textual display of results or error messages. Advanced CLIs will validate, interpret and parameter-expand the command line before executing the specified command, and optionally capture or redirect its output.

Unlike a button or menu item in a GUI, a command line is typically self-documenting, stating exactly what the user wants done. In addition, command lines usually include many defaults that can be changed to customize the results. Useful command lines can be saved by assigning a character string or alias to represent the full command, or several commands can be grouped to perform a more complex sequence – for instance, compile the program, install it, and run it — creating a single entity, called a command procedure or script which itself can be treated as a command. These advantages mean that a user must figure out a complex command or series of commands only once, because they can be saved, to be used again.

The commands given to a CLI shell are often in one of the following forms:

  • doSomething how toFiles
  • doSomething how sourceFile destinationFile
  • doSomething how < inputFile > outputFile
  • doSomething how | doSomething how | doSomething how > outputFile

where doSomething is, in effect, a verb, how an adverb (for example, should the command be executed "verbosely" or "quietly") and toFiles an object or objects (typically one or more files) on which the command should act. The > in the third example is a redirection operator, telling the command-line interpreter to send the output of the command not to its own standard output (the screen) but to the named file. This will overwrite the file. Using >> will redirect the output and append it to the file. Another redirection operator is the vertical bar (|), which creates a pipeline where the output of one command becomes the input to the next command.

CLI and resource protection

One can modify the set of available commands by modifying which paths appear in the PATH environment variable. Under Unix, commands also need be marked as executable files. The directories in the path variable are searched in the order they are given. By re-ordering the path, one can run e.g. \OS2\MDOS\E.EXE instead of \OS2\E.EXE, when the default is the opposite. Renaming of the executables also works: people often rename their favourite editor to EDIT, for example.

The command line allows one to restrict available commands, such as access to advanced internal commands. The Windows CMD.EXE does this. Often, shareware programs will limit the range of commands, including printing a command 'your administrator has disabled running batch files' from the prompt.

Some CLIs, such as those in network routers, have a hierarchy of modes, with a different set of commands supported in each mode. The set of commands are grouped by association with security, system, interface, etc. In these systems the user might traverse through a series of sub-modes. For example, if the CLI had two modes called interface and system, the user might use the command interface to enter the interface mode. At this point, commands from the system mode may not be accessible until the user exits the interface mode and enters the system mode.

Command prompt

Prompt of a BBC Micro after switch-on or hard reset

A command prompt (or just prompt) is a sequence of (one or more) characters used in a command-line interface to indicate readiness to accept commands. It literally prompts the user to take action. A prompt usually ends with one of the characters $, %, #, :, > or - and often includes other information, such as the path of the current working directory and the hostname.

On many Unix and derivative systems, the prompt commonly ends in $ or % if the user is a normal user, but in # if the user is a superuser ("root" in Unix terminology).

End-users can often modify prompts. Depending on the environment, they may include colors, special characters, and other elements (like variables and functions for the current time, user, shell number or working directory) in order, for instance, to make the prompt more informative or visually pleasing, to distinguish sessions on various machines, or to indicate the current level of nesting of commands. On some systems, special tokens in the definition of the prompt can be used to cause external programs to be called by the command-line interpreter while displaying the prompt.

In DOS' COMMAND.COM and in Windows NT's cmd.exe users can modify the prompt by issuing a PROMPT command or by directly changing the value of the corresponding %PROMPT% environment variable. The default of most modern systems, the C:\> style is obtained, for instance, with PROMPT $P$G. The default of older DOS systems, C> is obtained by just PROMPT, although on some systems this produces the newer C:\> style, unless used on floppy drives A: or B:; on those systems PROMPT $N$G can be used to override the automatic default and explicitly switch to the older style.

Many Unix systems feature the $PS1 variable (Prompt String 1), although other variables also may affect the prompt (depending on the shell used). In the Bash shell, a prompt of the form:

[time] user@host: work_dir $

could be set by issuing the command

export PS1='[\t] \u@\H: \W $'

In zsh the $RPROMPT variable controls an optional "prompt" on the right-hand side of the display. It is not a real prompt in that the location of text entry does not change. It is used to display information on the same line as the prompt, but right-justified.

In RISC OS the command prompt is a * symbol, and thus (OS) CLI commands are often referred to as "star commands". One can also access the same commands from other command lines (such as the BBC BASIC command line), by preceding the command with a *.

Arguments

An MS-DOS command line, illustrating parsing into command and arguments

A command-line argument or parameter is an item of information provided to a program when it is started. A program can have many command-line arguments that identify sources or destinations of information, or that alter the operation of the program.

When a command processor is active a program is typically invoked by typing its name followed by command-line arguments (if any). For example, in Unix and Unix-like environments, an example of a command-line argument is:

rm file.s

"file.s" is a command-line argument which tells the program rm to remove the file "file.s".

Some programming languages, such as C, C++ and Java, allow a program to interpret the command-line arguments by handling them as string parameters in the main function. Other languages, such as Python, expose operating system specific API (functionality) through sys module, and in particular sys.argv for "command-line arguments".

In Unix-like operating systems, a single hyphen used in place of a file name is a special value specifying that a program should handle data coming from the standard input or send data to the standard output.

Command-line option

A command-line option or simply option (also known as a flag or switch) modifies the operation of a command; the effect is determined by the command's program. Options follow the command name on the command line, separated by spaces. A space before the first option is not always required, such as Dir/? and DIR /? in DOS, which have the same effect of listing the DIR command's available options, whereas dir --help (in many versions of Unix) does require the option to be preceded by at least one space (and is case-sensitive).

The format of options varies widely between operating systems. In most cases the syntax is by convention rather than an operating system requirement; the entire command line is simply a string passed to a program, which can process it in any way the programmer wants, so long as the interpreter can tell where the command name ends and its arguments and options begin.

A few representative samples of command-line options, all relating to listing files in a directory, to illustrate some conventions:

Operating system Command Valid alternative Notes
OpenVMS directory/owner Dir /Owner instruct the directory command to also display the ownership of the files.
Note the Directory command name is not case sensitive, and can be abbreviated to as few letters as required to remain unique.
Windows DIR/Q/O:S d* dir /q d* /o:s display ownership of files whose names begin with "D", sorted by size, smallest first.
Note spaces around argument d* are required.
Unix-like systems ls -lS D* ls -S -l D* display in long format files and directories beginning with "D" (but not "d"), sorted by size (largest first).
Note spaces are required around all arguments and options, but some can be run together, e.g. -lS is the same as -l -S.
Data General RDOS CLI list/e/s 04-26-80/b List /S/E 4-26-80/B list every attribute for files created before 26 April 1980.
Note the /B at the end of the date argument is a local switch, that modifies the meaning of that argument, while /S and /E are global switches, i.e. apply to the whole command.
Abbreviating commands

In Multics, command-line options and subsystem keywords may be abbreviated. This idea appears to derive from the PL/I programming language, with its shortened keywords (e.g., STRG for STRINGRANGE and DCL for DECLARE). For example, in the Multics "forum" subsystem, the -long_subject parameter can be abbreviated -lgsj. It is also common for Multics commands to be abbreviated, typically corresponding to the initial letters of the words that are strung together with underscores to form command names, such as the use of did for delete_iacl_dir.

In some other systems abbreviations are automatic, such as permitting enough of the first characters of a command name to uniquely identify it (such as SU as an abbreviation for SUPERUSER) while others may have some specific abbreviations pre-programmed (e.g. MD for MKDIR in COMMAND.COM) or user-defined via batch scripts and aliases (e.g. alias md mkdir in tcsh).

Option conventions in DOS, Windows, OS/2

On DOS, OS/2 and Windows, different programs called from their COMMAND.COM or CMD.EXE (or internal their commands) may use different syntax within the same operating system. For example:

  • Options may be indicated by either of the "switch characters": /, -, or either may be allowed. See below.
  • They may or may not be case-sensitive.
  • Sometimes options and their arguments are run together, sometimes separated by whitespace, and sometimes by a character, typically : or =; thus Prog -fFilename, Prog -f Filename, Prog -f:Filename, Prog -f=Filename.
  • Some programs allow single-character options to be combined; others do not. The switch -fA may mean the same as -f -A, or it may be incorrect, or it may even be a valid but different parameter.

In DOS, OS/2 and Windows, the forward slash (/) is most prevalent, although the hyphen-minus is also sometimes used. In many versions of DOS (MS-DOS/PC DOS 2.xx and higher, all versions of DR-DOS since 5.0, as well as PTS-DOS, Embedded DOS, FreeDOS and RxDOS) the switch character (sometimes abbreviated switchar or switchchar) to be used is defined by a value returned from a system call (INT 21h/AX=3700h). The default character returned by this API is /, but can be changed to a hyphen-minus on the above-mentioned systems, except for under Datalight ROM-DOS and MS-DOS/PC DOS 5.0 and higher, which always return / from this call (unless one of many available TSRs to reenable the SwitChar feature is loaded). In some of these systems (MS-DOS/PC DOS 2.xx, DOS Plus 2.1, DR-DOS 7.02 and higher, PTS-DOS, Embedded DOS, FreeDOS and RxDOS), the setting can also be pre-configured by a SWITCHAR directive in CONFIG.SYS. General Software's Embedded DOS provides a SWITCH command for the same purpose, whereas 4DOS allows the setting to be changed via SETDOS /W:n. Under DR-DOS, if the setting has been changed from /, the first directory separator \ in the display of the PROMPT parameter $G will change to a forward slash / (which is also a valid directory separator in DOS, FlexOS, 4680 OS, 4690 OS, OS/2 and Windows) thereby serving as a visual clue to indicate the change. Also, the current setting is reflected also in the built-in help screens. Some versions of DR-DOS COMMAND.COM also support a PROMPT token $/ to display the current setting. COMMAND.COM since DR-DOS 7.02 also provides a pseudo-environment variable named %/% to allow portable batchjobs to be written. Several external DR-DOS commands additionally support an environment variable %SWITCHAR% to override the system setting.

However, many programs are hardwired to use / only, rather than retrieving the switch setting before parsing command-line arguments. A very small number, mainly ports from Unix-like systems, are programmed to accept "-" even if the switch character is not set to it (for example netstat and ping, supplied with Microsoft Windows, will accept the /? option to list available options, and yet the list will specify the "-" convention).

Option conventions in Unix-like systems

In Unix-like systems, the ASCII hyphen-minus begins options; the new (and GNU) convention is to use two hyphens then a word (e.g. --create) to identify the option's use while the old convention (and still available as an option for frequently-used options) is to use one hyphen then one letter (e.g., -c); if one hyphen is followed by two or more letters it may mean two options are being specified, or it may mean the second and subsequent letters are a parameter (such as filename or date) for the first option.

Two hyphen-minus characters without following letters (--) may indicate that the remaining arguments should not be treated as options, which is useful for example if a file name itself begins with a hyphen, or if further arguments are meant for an inner command (e.g., sudo). Double hyphen-minuses are also sometimes used to prefix "long options" where more descriptive option names are used. This is a common feature of GNU software. The getopt function and program, and the getopts command are usually used for parsing command-line options.

Unix command names, arguments and options are case-sensitive (except in a few examples, mainly where popular commands from other operating systems have been ported to Unix).

Option conventions in other systems

FlexOS, 4680 OS and 4690 OS use -.

CP/M typically used [.

Conversational Monitor System (CMS) uses a single left parenthesis to separate options at the end of the command from the other arguments. For example, in the following command the options indicate that the target file should be replaced if it exists, and the date and time of the source file should be retained on the copy: COPY source file a target file b (REPLACE OLDDATE)

Data General's CLI under their RDOS, AOS, etc. operating systems, as well as the version of CLI that came with their Business Basic, uses only / as the switch character, is case-insensitive, and allows "local switches" on some arguments to control the way they are interpreted, such as MAC/U LIB/S A B C $LPT/L has the global option "U" to the macro assembler command to append user symbols, but two local switches, one to specify LIB should be skipped on pass 2 and the other to direct listing to the printer, $LPT.

Built-in usage help

One of the criticisms of a CLI is the lack of cues to the user as to the available actions. In contrast, GUIs usually inform the user of available actions with menus, icons, or other visual cues. To overcome this limitation, many CLI programs display a usage message, typically when invoked with no arguments or one of ?, -?, -h, -H, /?, /h, /H, /Help, -help, or --help.

However, entering a program name without parameters in the hope that it will display usage help can be hazardous, as programs and scripts for which command line arguments are optional will execute without further notice.

Although desirable at least for the help parameter, programs may not support all option lead-in characters exemplified above. Under DOS, where the default command-line option character can be changed from / to -, programs may query the SwitChar API in order to determine the current setting. So, if a program is not hardwired to support them all, a user may need to know the current setting even to be able to reliably request help. If the SwitChar has been changed to - and therefore the / character is accepted as alternative path delimiter also at the DOS command line, programs may misinterpret options like /h or /H as paths rather than help parameters. However, if given as first or only parameter, most DOS programs will, by convention, accept it as request for help regardless of the current SwitChar setting.

In some cases, different levels of help can be selected for a program. Some programs supporting this allow to give a verbosity level as an optional argument to the help parameter (as in /H:1, /H:2, etc.) or they give just a short help on help parameters with question mark and a longer help screen for the other help options.

Depending on the program, additional or more specific help on accepted parameters is sometimes available by either providing the parameter in question as an argument to the help parameter or vice versa (as in /H:W or in /W:? (assuming /W would be another parameter supported by the program)).

In a similar fashion to the help parameter, but much less common, some programs provide additional information about themselves (like mode, status, version, author, license or contact information) when invoked with an "about" parameter like -!, /!, -about, or --about.

Since the ? and ! characters typically also serve other purposes at the command line, they may not be available in all scenarios, therefore, they should not be the only options to access the corresponding help information.

The end of the HELP command output from RT-11SJ displayed on a VT100

If more detailed help is necessary than provided by a program's built-in internal help, many systems support a dedicated external "help command" command (or similar), which accepts a command name as calling parameter and will invoke an external help system.

In the DR-DOS family, typing /? or /H at the COMMAND.COM prompt instead of a command itself will display a dynamically generated list of available internal commands; 4DOS and NDOS support the same feature by typing ? at the prompt (which is also accepted by newer versions of DR-DOS COMMAND.COM); internal commands can be individually disabled or reenabled via SETDOS /I. In addition to this, some newer versions of DR-DOS COMMAND.COM also accept a ?% command to display a list of available built-in pseudo-environment variables. Besides their purpose as quick help reference this can be used in batchjobs to query the facilities of the underlying command-line processor.

Command description syntax

Built-in usage help and man pages commonly employ a small syntax to describe the valid command form:

  • angle brackets for required parameters: ping <hostname>
  • square brackets for optional parameters: mkdir [-p] <dirname>
  • ellipses for repeated items: cp <source1> [source2…] <dest>
  • vertical bars for choice of items: netstat {-t|-u}

Notice that these characters have different meanings than when used directly in the shell. Angle brackets may be omitted when confusing the parameter name with a literal string is not likely.

The space character

In many areas of computing, but particularly in the command line, the space character can cause problems as it has two distinct and incompatible functions: as part of a command or parameter, or as a parameter or name separator. Ambiguity can be prevented either by prohibiting embedded spaces in file and directory names in the first place (for example, by substituting them with underscores _), or by enclosing a name with embedded spaces between quote characters or using an escape character before the space, usually a backslash (\). For example

Long path/Long program name Parameter one Parameter two

is ambiguous (is "program name" part of the program name, or two parameters?); however

Long_path/Long_program_name Parameter_one Parameter_two …,
LongPath/LongProgramName ParameterOne ParameterTwo …,
"Long path/Long program name" "Parameter one" "Parameter two"

and

Long\ path/Long\ program\ name Parameter\ one Parameter\ two

are not ambiguous. Unix-based operating systems minimize the use of embedded spaces to minimize the need for quotes. In Microsoft Windows, one often has to use quotes because embedded spaces (such as in directory names) are common.

Command-line interpreter

Although most users think of the shell as an interactive command interpreter, it is really a programming language in which each statement runs a command. Because it must satisfy both the interactive and programming aspects of command execution, it is a strange language, shaped as much by history as by design.

The term command-line interpreter (CLI) is applied to computer programs designed to interpret a sequence of lines of text which may be entered by a user, read from a file or another kind of data stream. The context of interpretation is usually one of a given operating system or programming language.

Command-line interpreters allow users to issue various commands in a very efficient (and often terse) way. This requires the user to know the names of the commands and their parameters, and the syntax of the language that is interpreted.

The Unix #! mechanism and OS/2 EXTPROC command facilitate the passing of batch files to external processors. One can use these mechanisms to write specific command processors for dedicated uses, and process external data files which reside in batch files.

Many graphical interfaces, such as the OS/2 Presentation Manager and early versions of Microsoft Windows use command-lines to call helper programs to open documents and programs. The commands are stored in the graphical shell or in files like the registry or the OS/2 OS2USER.INI file.

Early history

A Teletype Model 33 ASR teleprinter keyboard with punched tape reader and punch
DEC VT52 terminal

The earliest computers did not support interactive input/output devices, often relying on sense switches and lights to communicate with the computer operator. This was adequate for batch systems that ran one program at a time, often with the programmer acting as operator. This also had the advantage of low overhead, since lights and switches could be tested and set with one machine instruction. Later a single system console was added to allow the operator to communicate with the system.

From the 1960s onwards, user interaction with computers was primarily by means of command-line interfaces, initially on machines like the Teletype Model 33 ASR, but then on early CRT-based computer terminals such as the VT52.

All of these devices were purely text based, with no ability to display graphic or pictures.[nb 3] For business application programs, text-based menus were used, but for more general interaction the command line was the interface.

Around 1964 Louis Pouzin introduced the concept and the name shell in Multics, building on earlier, simpler facilities in the Compatible Time-Sharing System (CTSS).

From the early 1970s the Unix operating system adapted the concept of a powerful command-line environment, and introduced the ability to pipe the output of one command in as input to another. Unix also had the capability to save and re-run strings of commands as "shell scripts" which acted like custom commands.

The command-line was also the main interface for the early home computers such as the Commodore PET, Apple II and BBC Micro – almost always in the form of a BASIC interpreter. When more powerful business oriented microcomputers arrived with CP/M and later DOS computers such as the IBM PC, the command-line began to borrow some of the syntax and features of the Unix shells such as globbing and piping of output.

The command-line was first seriously challenged by the PARC GUI approach used in the 1983 Apple Lisa and the 1984 Apple Macintosh. A few computer users used GUIs such as GEOS and Windows 3.1 but the majority of IBM PC users did not replace their COMMAND.COM shell with a GUI until Windows 95 was released in 1995.

Modern usage as an operating system shell

While most non-expert computer users now use a GUI almost exclusively, more advanced users have access to powerful command-line environments:

  • The default VAX/VMS command shell, using the DCL language, has been ported to Windows systems at least three times, including PC-DCL and Acceler8 DCL Lite. Unix command shells have been ported to VMS and DOS/Windows 95 and Windows NT types of operating systems.
  • COMMAND.COM is the command-line interpreter of MS-DOS, IBM PC DOS, and clones such as DR-DOS, SISNE plus, PTS-DOS, ROM-DOS, and FreeDOS.
  • Windows Resource Kit and Windows Services for UNIX include Korn and the Bourne shells along with a Perl interpreter (Services for UNIX contains ActiveState ActivePerl in later versions and Interix for versions 1 and 2 and a shell compiled by Microsoft)
  • IBM OS/2 (and derivatives such as eComStation and ArcaOS) has the cmd.exe processor. This copies the COMMAND.COM commands, with extensions to REXX.
  • cmd.exe is part of the Windows NT stream of operating systems.
  • Yet another cmd.exe is a stripped-down shell for Windows CE 3.0.
  • An MS-DOS type interpreter called PocketDOS has been ported to Windows CE machines; the most recent release is almost identical to MS-DOS 6.22 and can also run Windows 1, 2, and 3.0, QBasic and other development tools, 4NT and 4DOS. The latest release includes several shells, namely MS-DOS 6.22, PC DOS 7, DR DOS 3.xx, and others.
  • Windows users might use the CScript interface to alternate programs, from command-line. PowerShell provides a command-line interface, but its applets are not written in Shell script. Implementations of the Unix shell are also available as part of the POSIX sub-system, Cygwin, MKS Toolkit, UWIN, Hamilton C shell and other software packages. Available shells for these interoperability tools include csh, ksh, sh, Bash, rsh, tclsh and less commonly zsh, psh
  • Implementations of PHP have a shell for interactive use called php-cli.
  • Standard Tcl/Tk has two interactive shells, Tclsh and Wish, the latter being the GUI version.
  • Python, Ruby, Lua, XLNT, and other interpreters also have command shells for interactive use.
  • FreeBSD uses tcsh as its default interactive shell for the superuser, and ash as default scripting shell.
  • Many Linux distributions have the Bash implementation of the Unix shell.
  • Apple macOS and some Linux distributions use zsh. Previously, macOS used tcsh and Bash.
  • Embedded Linux (and other embedded Unix-like) devices often use the Ash implementation of the Unix shell, as part of Busybox.
  • Android uses the mksh shell, which replaces a shell derived from ash that was used in older Android versions, supplemented with commands from the separate toolbox binary.
  • Routers with Cisco IOS, Junos and many others are commonly configured from the command line.
  • The Plan 9 operating system uses the rc shell which is similar in design to the Bourne shell.

Scripting

Most command-line interpreters support scripting, to various extents. (They are, after all, interpreters of an interpreted programming language, albeit in many cases the language is unique to the particular command-line interpreter.) They will interpret scripts (variously termed shell scripts or batch files) written in the language that they interpret. Some command-line interpreters also incorporate the interpreter engines of other languages, such as REXX, in addition to their own, allowing the executing of scripts, in those languages, directly within the command-line interpreter itself.

Conversely, scripting programming languages, in particular those with an eval function (such as REXX, Perl, Python, Ruby or Jython), can be used to implement command-line interpreters and filters. For a few operating systems, most notably DOS, such a command interpreter provides a more flexible command-line interface than the one supplied. In other cases, such a command interpreter can present a highly customised user interface employing the user interface and input/output facilities of the language.

Other command-line interfaces

The command line provides an interface between programs as well as the user. In this sense, a command line is an alternative to a dialog box. Editors and databases present a command line, in which alternate command processors might run. On the other hand, one might have options on the command line, which opens a dialog box. The latest version of 'Take Command' has this feature. DBase used a dialog box to construct command lines, which could be further edited before use.

Programs like BASIC, diskpart, Edlin, and QBASIC all provide command-line interfaces, some of which use the system shell. Basic is modeled on the default interface for 8-bit Intel computers. Calculators can be run as command-line or dialog interfaces.

Emacs provides a command-line interface in the form of its minibuffer. Commands and arguments can be entered using Emacs standard text editing support, and output is displayed in another buffer.

There are a number of text mode games, like Adventure or King's Quest 1-3, which relied on the user typing commands at the bottom of the screen. One controls the character by typing commands like 'get ring' or 'look'. The program returns a text which describes how the character sees it, or makes the action happen. The text adventure The Hitchhiker's Guide to the Galaxy, a piece of interactive fiction based on Douglas Adam's book of the same name, is a teletype-style command-line game.

The most notable of these interfaces is the standard streams interface, which allows the output of one command to be passed to the input of another. Text files can serve either purpose as well. This provides the interfaces of piping, filters and redirection. Under Unix, devices are files too, so the normal type of file for the shell used for stdin,stdout and stderr is a tty device file.

Another command-line interface allows a shell program to launch helper programs, either to launch documents or start a program. The command is processed internally by the shell, and then passed on to another program to launch the document. The graphical interface of Windows and OS/2 rely heavily on command-lines passed through to other programs – console or graphical, which then usually process the command line without presenting a user-console.

Programs like the OS/2 E editor and some other IBM editors, can process command-lines normally meant for the shell, the output being placed directly in the document window.

A web browser's URL input field can be used as a command line. It can be used to "launch" web apps, access browser configuration, as well as perform a search. Google, which has been called "the command line of the internet" will perform a domain-specific search when it detects search parameters in a known format. This functionality is present whether the search is triggered from a browser field or on Google's website.

There are JavaScript libraries that allow to write command line applications in browser as standalone Web apps or as part of bigger application. An example of such a website is the CLI interface to DuckDuckGo. There are also Web-based SSH applications, that allow to give access to server command line interface from a browser.

Many PC video games feature a command line interface often referred to as a console. It is typically used by the game developers during development and by mod developers for debugging purposes as well as for cheating or skipping parts of the game.

Education

From Wikipedia, the free encyclopedia

photo of a lecture at the Faculty of Biomedical Engineering, Czech Technical University
photo of school children sitting in the shade of an orchard in Bamozai, near Gardez, Paktia Province, Afghanistan
photo of the FIRST Robotics Competition in Washington, D.C
photo of early childhood education in Ziway, Ethiopia
From top to bottom: Lecture at the Faculty of Biomedical Engineering, Czech Technical University, in Prague, Czech Republic; School children sitting in the shade of an orchard in Bamozai, near Gardez, Paktia Province, Afghanistan; Student participants in the FIRST Robotics Competition, Washington, D.C.; Early childhood education through USAID in Ziway, Ethiopia

Education is the transmission of knowledge, skills, and character traits. There are many debates about its precise definition, for example, about which aims it tries to achieve. A further issue is whether part of the meaning of education is that the change in the student is an improvement. Some researchers stress the role of critical thinking to distinguish education from indoctrination. These disagreements affect how to identify, measure, and improve forms of education. The term can also refer to the mental states and qualities of educated people. Additionally, it can mean the academic field studying education.

There are many types of education. Formal education happens in a complex institutional framework, like public schools. Non-formal education is also structured but happens outside the formal schooling system. Informal education is unstructured learning through daily experiences. Formal and non-formal education are divided into levels. They include early childhood education, primary education, secondary education, and tertiary education. Other classifications focus on the teaching method, like teacher-centered and student-centered education. Forms of education can also be distinguished by subject, like science education, language education, and physical education.

Education socializes children into society by teaching cultural values and norms. It equips them with the skills needed to become productive members of society. This way, it stimulates economic growth and raises awareness of local and global problems. Organized institutions affect many aspects of education. For example, governments set education policies. They determine when school classes happen, what is taught, and who can or must attend. International organizations, like UNESCO, have been influential in promoting primary education for all children.

Many factors influence whether education is successful. Psychological factors include motivation, intelligence, and personality. Social factors, like socioeconomic status, ethnicity, and gender, are often linked to discrimination. Further factors include educational technology, teacher quality, and parent involvement.

The main field investigating education is called education studies. It examines what education is and what aims it has. It also studies how it happens, what effects it has, and how to improve it. It has many subfields, like philosophy of education, psychology of education, sociology of education, economics of education, and comparative education. It also discusses the history of education. In prehistory, education happened informally through oral communication and imitation. With the rise of ancient civilizations, writing was invented, and the amount of knowledge grew. This caused a shift from informal to formal education. Initially, formal education was mainly available to elites and religious groups. The invention of the printing press in the 15th century made books more widely available. This increased general literacy. Beginning in the 18th and 19th centuries, public education became more important. It led to the worldwide process of making primary education available to all, free of charge, and compulsory up to a certain age.

Definitions

The definition of education has been explored by theorists from various fields. Many agree that education is a purposeful activity aimed at achieving certain goals, which include the transmission of knowledge, skills, and character traits. However, there is extensive debate regarding its exact nature beyond these general features. Some theorists view education primarily as a process that occurs during educational events such as schooling, teaching, and learning. Others perceive it not as a process but as the product resulting from this process, emphasizing the mental states and dispositions of educated persons. Additionally, the term may also refer to an academic field that studies the methods, processes, and social institutions involved in teaching and learning. The term "education" is derived from the Latin words educare, meaning "bring up, rear, educate", primarily related to the mind, and educere, meaning "bring out, lead forth", and refers to the bodily level.

Some theorists provide precise definitions by identifying the specific features that are exclusive to all forms of education. R. S. Peters, for instance, outlines three essential features for education:

  • It is concerned with the transmission of knowledge and understanding.
  • This transmission is worthwhile.
  • It is done in a morally appropriate manner in tune with the student's interests.

Such precise definitions often succeed at characterizing the most typical forms of education. But they are criticized because there are counterexamples. These difficulties have led some theorists to develop less precise concepts. Some of them are based on family resemblance. This means that all the forms of education are similar to each other. But they need not share a set of essential features that all of them have in common. Some theorists claim that the term "education" is context-dependent. This implies that its meaning varies depending on the situation in which it is used. Having a clear idea of what the term means is important to correctly identify forms of education. It also matters when trying to measure or improve them.

There is disagreement in the academic literature on whether education is an evaluative concept. This means that being good in some sense is part of the definition of education. So-called thick definitions affirm this. They may claim, for example, that an improvement of the learner is a requirement of education. Different thick definitions may still disagree among themselves on what kind of improvement is needed. Thin definitions, on the other hand, try to give a value-neutral account of education. A closely related distinction is that between descriptive and prescriptive conceptions. Descriptive conceptions aim to describe how the term is actually used by regular speakers. Prescriptive conceptions try to express what good education is or how it should be done.

Many thick and prescriptive conceptions rely on the aims of education to explain their view. This means that they see education as an activity that tries to achieve certain aims. These aims can be classified into different categories. There is one category for epistemic goods, like knowledge and understanding. Another category covers skills, like rationality and critical thinking. Additionally, there are character traits, like kindness and honesty.

Some theorists focus on a single overarching purpose of education and see the more specific aims as means to this end. For example, they may claim that socialization is the aim of education. This means that education is seen as the process of transmitting accumulated knowledge from one generation to the next. This process helps the student to function in society as a regular citizen. More person-centered definitions focus on the well-being of the student instead. For them, education is a process that helps them lead a good life or the life they wish to lead. Various scholars stress critical thinking to distinguish education from indoctrination. For them, mere indoctrination is only interested in instilling beliefs in the student, independent of whether they are rational. Education, on the other hand, should also foster the rational ability to critically reflect on those beliefs and question them. But some theorists contend that some forms of indoctrination may be necessary in the early stages of education. It may be needed until the child's mind is sufficiently developed.

Education can be characterized from the teacher's or the student's perspective. Teacher-centered definitions focus on the perspective and role of the teacher. They may claim, for example, that education is the transmission of knowledge and skills in a morally appropriate way. Student-centered definitions, on the other hand, see education from the student's experience in the learning process. For example, they may define it as a process that transforms and enriches their subsequent experience. Definitions taking both perspectives into account are also possible. This can take the form of describing the process as the shared experience of a common world. This shared experience involves discovery as well as posing and solving problems.

Types

There are many classifications of education. It depends on the institutional framework whether education is formal, non-formal, or informal. Levels of education are distinguished based on factors like the student's age and the complexity of the content. Some classifications focus on the learner or the topic. Others rely on the teaching method, the medium used, or the funding.

Formal, non-formal, and informal

Photo of a tutoring lesson
Photo of father and daughter cooking
Tutoring is an example of non-formal education while learning how to cook from ones parents belongs to informal education.

Education is often divided into types. The most common division is between formal, non-formal, and informal education. However, some theorists only distinguish between formal and informal education. Formal education happens in a complex institutional framework. Such frameworks have a chronological and hierarchical order. For instance, the modern schooling system has classes based on the student's age and progress, all the way from primary school to university. Formal education is usually controlled and guided by the government. It is normally compulsory up to a certain age.

Non-formal and informal education take place outside the formal schooling system. Non-formal education is a middle ground. Like formal education, it is organized, systematic, and carried out with a clear purpose in mind. Examples are tutoring, fitness classes, and the scouting movement. Informal education, on the other hand, happens in an unsystematic way through daily experiences and exposure to the environment. Unlike formal and non-formal education, there is usually no designated authority figure responsible for teaching. Informal education is present in many settings. It happens throughout one's life, mostly in a spontaneous way. This is how children learn their mother tongue from their parents or how people learn to prepare a dish by cooking together.

Some theorists distinguish the three types based on the location of learning. Formal education takes place in school. Informal education occurs in places of everyday routines. Non-formal education happens in places that are occasionally visited. There are also differences in the source of motivation. Formal education is mainly driven by extrinsic motivation for external rewards. Non-formal and informal education are closely linked to intrinsic motivation because the learning itself is enjoyed. The distinction between the three types is normally clear for the typical cases. But some forms of education do not easily fall into one category.

Formal education plays a central role in modern civilization. But in primitive cultures, most of the education happened on the informal level. This usually means that there is no distinction between activities focused on education and other activities. Instead, the whole environment acts as a form of school and most adults act as teachers. However, informal education is often not efficient enough to pass on large quantities of knowledge. To do so, a formal setting and well-trained teachers are usually required. This was one of the reasons why in the course of history, formal education became more and more important. In this process, the experience of education became more abstract and removed from daily life. More emphasis was put on grasping general patterns instead of observing and imitating behavior.

Levels

Types of education are often divided into levels or stages. The most influential framework is the International Standard Classification of Education. It is maintained by the United Nations Educational, Scientific and Cultural Organization (UNESCO). It covers both formal and non-formal education. It distinguishes levels based on the student's age, the duration of learning, and the complexity of the discussed content. Further criteria include entry requirements, teacher qualifications, and the intended outcome of successful completion. The levels are grouped together into early childhood education (level 0), primary education (level 1), secondary education (levels 2-3), post-secondary non-tertiary education (level 4), and tertiary education (levels 5-8).

photo of a kindergarten lesson in Japan
Young children in a kindergarten in Japan

Early childhood education is also known as preschool education or nursery education. It is the stage of education that begins with birth and lasts until the start of primary school. It follows the holistic aim of fostering early child development at the physical, mental, and social levels. It plays a key role in socialization and personality development. It includes various basic skills in the areas of communication, learning, and problem-solving. This way, it prepares children for their entry into primary education.

Primary (or elementary) education usually starts at the age of five to seven and lasts for four to seven years. It does not have any further entry requirements. Its main goal is to teach the basic skills in the fields of reading, writing, and mathematics. But it also covers the core knowledge in other fields, like history, geography, the sciences, music, and art. A further aim is to foster personal development. Today, primary education is compulsory in almost all countries. Over 90% of all primary-school-age children worldwide attend primary school.

Secondary education is the stage of education following primary education. It usually covers the ages of 12 to 18 years. It is commonly divided into lower secondary education (middle school or junior high school) and upper secondary education (high school, senior high school, or college depending on the country). Lower secondary education normally has the completion of primary school as its entry requirement. It aims to extend and deepen the learning outcomes. It is more strongly focused on subject-specific curricula and teachers are specialized in only one or a few specific subjects. One of its aims is to familiarize students with the basic theoretical concepts in these fields. This helps create a solid basis for lifelong learning. In some cases, it also includes vocational training. In many countries, it is the last stage of compulsory education.

A high-school senior (twelfth grade) classroom in Calhan, Colorado, United States

Upper secondary education aims to provide students with the skills and knowledge needed for employment or tertiary education. Its requirement is usually the completion of lower secondary education. Its subjects are more varied and complex. The students can often choose between a few subjects. Its successful completion is commonly tied to a formal qualification in the form of a high school diploma. There are some types of education after secondary education that do not belong to tertiary education. They are often similar in complexity to secondary education. But they tend to focus more on vocational training to prepare students for the job market.

photo of students in a laboratory at the Saint Petersburg State Polytechnical University
Students in a laboratory, Saint Petersburg State Polytechnical University

Tertiary education is also referred to as higher education. It expands upon the foundations of secondary education but has a more narrow and in-depth focus on a specific field or subject. Its completion leads to an academic degree. It can be divided into four levels: short-cycle tertiary, Bachelor's, Master's, and doctoral level education. They often form a hierarchical structure with later levels depending on the completion of previous levels.

Short-cycle tertiary education focuses on practical matters. It includes advanced vocational and professional training to prepare students for the job market in specialized professions. Bachelor's level education is also referred to as undergraduate education. It tends to be longer than short-cycle tertiary education. It is usually offered by universities and results in an intermediary academic certification in the form of a Bachelor's degree. Master's level education is more specialized than undergraduate education. Many programs require independent research in the form of a Master's thesis as a requirement for successful completion. Doctoral level education leads to an advanced research qualification, normally in the form of a doctor's degree. It usually requires the submission of a substantial academic work, such as a dissertation.

Others

Many other types of education are discussed in the academic literature, like the distinction between traditional and alternative education. Traditional education concerns long-established and mainstream schooling practices. It uses teacher-centered education and takes place in a well-regulated school environment. Regulations cover many aspects of education, such as the curriculum and the timeframe when classes start and end.

Image of a homeschooling lesson
Homeschooling is one form of alternative education.

Alternative education is an umbrella term for forms of schooling that differ from the mainstream traditional approach. For example, they may use a different learning environment, teach different subjects, or promote a different teacher-student relationship. Alternative schooling is characterized by voluntary participation, relatively small class and school sizes, and personalized instruction. This often results in a more welcoming and emotionally safe atmosphere. It encompasses many types like charter schools and special programs for problematic or gifted children. It also includes homeschooling and unschooling. For instance, Montessori schools, Waldorf schools, and Round Square schools are alternative schools. Further examples are Escuela Nueva schools, free schools, and democratic schools. Alternative education also includes indigenous education. It focuses on the transmission of knowledge and skills from an indigenous heritage. Its method gives more emphasis to narration and storytelling.

Other distinctions are based on who receives education. Categories by the age of the learner are childhood education, adolescent education, adult education, and elderly education. Special education is education that is specifically adapted to meet the unique needs of students with disabilities. It covers various forms of impairments on the intellectual, social, communicative, and physical levels. It aims to overcome the challenges posed by these impairments. This way, it provides the affected students with access to an appropriate education. When understood in the broadest sense, it also includes education for very gifted children who need adjusted curricula to reach their fullest potential.

Some classifications focus on the teaching method. In teacher-centered education, for example, the teacher takes center stage in providing students with information. It contrasts with student-centered education, in which students take on a more active and responsible role in shaping classroom activities. For conscious education, learning and teaching happen with a clear purpose in mind. Unconscious education, on the other hand, occurs on its own without being consciously planned or guided. This may happen in part through the personality of teachers and adults. Their personality can have indirect effects on the development of the student's personality.

Autodidacticism or self-education is self-directed learning. It happens without the guidance of teachers and institutions. It mainly occurs in adult education. It is characterized by the freedom to choose what and when to study. For this reason, it can be a more fulfilling learning experience. However, the lack of structure and guidance can result in aimless learning. Due to the absence of external feedback, autodidacts may develop false ideas and inaccurately assess their learning progress. It is closely related to lifelong education, which is an ongoing learning process throughout a person's entire life.

Forms of education can also be categorized by the subject and the medium used. Types based on the subject include science education, language education, art education, religious education, and physical education. Special mediums, such as radio or websites, are usually used in distance education. Examples include e-learning (use of computers), m-learning (use of mobile devices), and online education. They often take the form of open education, in which the courses and materials are made available with a minimal amount of barriers. They contrast with regular classroom or onsite education.

A further distinction is based on the type of funding. Public education is also referred to as state education. It is education funded and controlled by the government. It is available to the general public. It normally does not require tuition fees and is thus a form of free education. It contrasts with private education, which is funded and managed by private institutions. Private schools often have a more selective admission process. Many offer paid education by charging tuition fees. A more detailed classification focuses on the social institution responsible for education. It includes categories for institutions like family, school, civil society, state, and church.

Compulsory education is education that people are legally required to receive. It concerns mainly children who need to visit school up to a certain age. It contrasts with voluntary education, which people pursue by personal choice without a legal requirement.

Evidence-based education uses well-designed scientific studies to determine which methods of education work best. Its goal is to maximize the effectiveness of educational practices and policies. This is achieved by ensuring that they are informed by the best available empirical evidence. It includes evidence-based teaching, evidence-based learning, and school effectiveness research.

Role in society

Education plays various roles in society, including in social, economic, and personal fields. On a social level, education makes it possible to establish and sustain a stable society. It helps people acquire the basic skills needed to interact with their environment and fulfill their needs and desires. In modern society, this involves a wide range of skills like being able to speak, read, and write as well as to solve problems and to perform basic arithmetic tasks. It also includes the ability to handle information and communications technology. Children are socialized into society by acquiring these skills. Another key part of socialization is to learn how to live in social groups and interact with others by coming to understand social and cultural norms and expectations. This requires an understanding of what kinds of behavior are considered appropriate in different contexts. This way, new members are introduced to the culture, norms, and values that are dominant in their society. Socialization happens throughout life but is of special relevance to early childhood education. It enables a form of social cohesion, stability, and peace needed for people to productively engage in their daily business. Education plays a key role in democracies by increasing civic participation in the form of voting and organizing and through its tendency to promote equal opportunity for all.

A further issue is to enable people to become productive members of society by learning how to contribute to it. Through education, individuals acquire the technical and analytical skills needed to pursue their profession, produce goods, and provide services to others. In early societies, there was little specialization and each child would generally learn most of the tasks relevant to help their group. Modern societies are increasingly complex and many professions are only mastered by relatively few people who receive specialized training in addition to general education. Some of the skills and tendencies learned to function in society may conflict with each other and their value depends on the context of their usage. For example, fostering a questioning mind is necessary to develop the ability of critical thinking but in some cases, obedience to an authority is required to ensure social stability.

By helping people become productive members of society, education can stimulate economic growth and reduce poverty. It helps workers become more skilled and thereby increases the quality of the produced goods and services, which in turn leads to prosperity and increased competitiveness. In this regard, public education is often understood as a long-term investment to benefit society as a whole. The rate of return is especially high for investments in primary education. Besides increasing economic prosperity, it can also lead to technological and scientific advances as well as decrease unemployment while promoting social equity.

Education can prepare a country to adapt to changes and successfully face new challenges. For example, it can help raise awareness and contribute to the solution of contemporary global problems. Examples are climate change and sustainability as well as the widening inequalities between the rich and the poor. By making students aware of how their lives and actions affect others, it may inspire some to work toward realizing a more sustainable and fair world. This way, education serves not just the purpose of reproducing society as it is but can also be an instrument of development by realizing social transformation to improve society. This applies also to changing circumstances in the economic sector. For example, due to technological advances and increased automation, many jobs may be lost in the coming decades. This may render currently taught skills and knowledge redundant while shifting the importance to other areas. Education can be used to prepare people for such changes by adjusting the curriculum. This way, subjects involving digital literacy and skills in handling new technologies can be promoted. Another example is online education in the form of massive open online courses.

On a more individual level, education promotes personal development. This can include factors such as learning new skills, developing talents, fostering creativity, and increasing self-knowledge as well as improving problem-solving and decision-making abilities. It further has positive effects on health and well-being. While education is of high relevance in childhood, it does not end with adulthood and continues throughout life. This phenomenon is known as lifelong learning. It is of specific significance in contemporary society due to the rapid changes on many levels and the need for people to adjust to them.

The social importance of education is recognized in the annual International Day of Education on January 24. The year 1970 was declared International Education Year.

Role of institutions

photo of a sign of the Beijing Normal University
Beijing Normal University, which is governed directly by the Chinese Ministry of Education, is an example of collaboration between different entities in the education sector.

Organized institutions play a key role for various aspects of education. Institutions like schools, universities, teacher training institutions, and ministries of education make up the education sector. They interact both with each other and with other stakeholders, such as parents, local communities, and religious groups. Further stakeholders are NGOs, professionals in healthcare, law enforcement, media platforms, and political leaders. Many people are directly involved in the education sector. They include students, teachers, and school principals as well as school nurses and curriculum developers.

Many aspects of formal education are regulated by the policies of governmental institutions. They determine at what age children need to attend school and at what times classes are held as well as issues pertaining to the school environment, like infrastructure. Regulations also cover the exact requirements for teachers and how they are trained. An important aspect of education policy concerns the curriculum used for teaching at schools, colleges, and universities. A curriculum is a planned sequence of instructions or a program of learning that intends to guide the experience of learners to achieve the aims of education. The topics are usually selected based on their importance and depend on the type of school. For example, the goals of public school curricula are usually to offer a comprehensive and well-rounded education while vocational trainings focus more on specific practical skills within a field. The curricula also cover various aspects besides the topic to be discussed, such as the teaching method, the objectives to be reached, and the standards for assessing progress. By determining the curricula, governmental institutions have a strong impact on what knowledge and skills are transmitted to the students.

International organizations also play a key role in education. For example, UNESCO is an intergovernmental organization that promotes education in many ways. One of its activities is to advocate education policies. One example is the treaty UNCRC. It states that education is a human right of all children and young people. Another is the Education for All initiative. It aimed to offer basic education to all children, adolescents, and adults by the year 2015. It was later replaced by the initiative Sustainable Development Goals as goal 4. Related policies include the Convention against Discrimination in Education and the Futures of Education initiative.

Some influential organizations are not intergovernmental but non-governmental. For example, the International Association of Universities promotes the exchange of colleges and universities around the world. The International Baccalaureate offers international diploma programs. Many institutions, like the Erasmus Programme, facilitate student exchanges between countries.

Factors of educational success

Many factors influence educational achievement. They include psychological factors, which concern the student as an individual, and sociological factors, which pertain to the student's social environment. Further factors include access to educational technology, teacher quality, and parent involvement. Many of these factors overlap and influence each other.

Psychological

On a psychological level, relevant factors include motivation, intelligence, and personality. Motivation is the internal force propelling people to engage in learning. Motivated students are more likely to interact with the content to be learned by participating in classroom activities like discussions, which often results in a deeper understanding of the subject. It can also help students overcome difficulties and setbacks. An important distinction is between intrinsic and extrinsic motivation. Intrinsically motivated students are driven by an interest in the subject and the learning experience itself. Extrinsically motivated students seek external rewards. They may strive for good grades and recognition by their peers. It is often claimed that intrinsic motivation is more beneficial by leading to increased creativity and engagement as well as long-term commitment. Educational psychologists try to discover how to increase motivation. This can be achieved by encouraging some competition among students. Another factor is to balance positive and negative feedback in the form of praise and criticism.

Intelligence is another important factor in how people respond to education. It is a mental quality linked to the ability to learn from experience, to understand, and to employ knowledge and skills to solve problems. Those who have higher scores in intelligence metrics tend to perform better at school and go on to higher levels of education. Intelligence is often primarily associated with the so-called IQ, a standardized numerical metric for assessing intelligence. However, it has been argued that there different types of intelligences pertaining to distinct areas. According to Howard Gardner, some affect the areas of mathematics, logic, and spatial cognition. Others concern language and music. There are also distinct types for interacting with other people and with oneself. These forms are largely independent of each other. This means that someone may excel at one type while scoring low on another.

A closely related factor concerns learning styles. A learning style is a preferred form of acquiring knowledge and skills. For example, students with an auditory learning style find it easy to follow spoken lectures and discussions while visual learners benefit if information is presented visually in diagrams and videos. For efficient learning, it is often beneficial to include a wide variety of learning modalities. The learner's personality may also affect educational achievement. For example, the features of conscientiousness and openness to experience from the Big Five personality traits are linked to academic success. Further mental factors include self-efficacy, self-esteem, and metacognitive abilities.

Sociological

Unlike psychological factors, sociological factors focus not on the mental attributes of learners but on their social status and environment. They include socioeconomic status, ethnicity, and cultural background as well as gender. They are of interest to researchers since they are associated with inequality and discrimination. For this reason, they play a key role in policy-making in attempts to mitigate their effects.

Socioeconomic status depends on income but includes other factors as well, such as financial security, social status, and social class as well as quality of life attributes. Low socioeconomic status affects educational success in various ways. It is linked to slower cognitive developments in language and memory and higher dropout rates. Poor families may not have enough money to invest in educational resources like stimulating toys, books, and computers. Additionally, they may be unable to afford tuition at prestigious schools and are more likely to attend schools in poorer areas. Such schools tend to offer lower standards of teaching, for example, because of teacher shortages or because they lack educational materials and facilities, like libraries. Poor parents may also be unable to afford private lessons if their children lack behind. Students from a low socioeconomic status often have less access to information on higher education and may face additional difficulties in securing and repaying student loans. Low socioeconomic status also has many indirect negative effects because it is linked to lower physical and mental health. Due to these factors, social inequalities on the level of the parents are often reproduced in the children.

Ethnic background is linked to cultural differences and language barriers, which make it more difficult for students to adapt to the school environment and follow classes. Additional factors are explicit and implicit biases and discrimination toward ethnic minorities. This may affect the students' self-esteem and motivation as well as their access to educational opportunities. For example, teachers may hold stereotypical views even if they are not overtly racist, which can lead them to grade comparable performances differently based on the child's ethnicity.

Historically, gender has been a central factor in education since the roles of males and females were defined differently in many societies. Education tended to strongly favor males, who were expected to provide for the family. Females, on the other hand, were expected to manage the household and rear children, which severely hampered the educational opportunities available to them. And while these inequalities have improved in most modern societies, there are still gender differences in education. Among other things, this concerns biases and stereotypes linked to the role of gender in education. An example is that subjects like science, technology, engineering, and mathematics are often presented as male fields. This discourages female students to follow them.

One aspect of many social factors is given by the expectations associated with stereotypes. On the one hand, they work on an external level based on how people react to a person belonging to a certain group. On the other hand, they also affect the internal level because the person internalizes them and acts accordingly. In this sense, the expectations may turn into self-fulfilling prophecies by causing the educational outcomes they anticipate. This can happen both for positive and for negative stereotypes.

Technology and others

Technology plays another significant role in educational success. Educational technology is commonly associated with the use of modern digital devices, like computers. But understood in the broadest sense, it involves a wide range of resources and tools for learning, including basic aids that do not involve the use of machines, like regular books and worksheets.

photo of a group of children being introduced to a laptop
The OLPC laptop being introduced to children in Haiti

Educational technology can benefit learning in various ways. In the form of media, it often takes the role of the primary supplier of information in the classroom. This means that the teacher can focus their time and energy on other tasks, like planning the lesson and guiding students as well as assessing educational performance. It can also make information easier to understand, for example, by presenting it using graphics and videos rather than through mere text. In this regard, interactive elements may be used to make the learning experience more engaging, for example, in the form of educational games. Technology can be employed to make educational materials accessible to many people, like when using online resources. It additionally facilitates collaboration between students and communication with teachers. Lack of educational technology is an issue specifically in various developing countries and many efforts are made to address it, like the One Laptop per Child initiative.

A closely related issue concerns the effects of school infrastructure. It includes various physical aspects of the school, like its location and size as well as the available school facilities and equipment. For example, a healthy and safe environment, well-maintained classrooms, and suitable classroom furniture as well as the availability of a library and a canteen tend to contribute to educational success. The quality of the teacher also has an important impact on educational success. For example, skilled teachers are able to motivate and inspire students and are able to adjust their instructions to the students' abilities and needs. Important in this regard are the teacher's own education and training as well as their past teaching experience. A meta-analysis by Engin Karadağ et al. concludes that, compared to other influences, factors related to the school and the teacher have the biggest impact on student achievement.

An additional factor to boost educational achievement is parent involvement. It can make children more motivated and invested if they are aware that their parents care about their educational efforts. This tends to lead to increased self-esteem, better attendance rates, and more constructive behavior at school. Parent involvement also includes communication with teachers and other school staff, for example, to make other parties aware of current issues and how they may be resolved. Further relevant factors sometimes discussed in the academic literature include historical, political, demographic, religious, and legal aspects.

Education studies

photo of the cover of the title page of John Locke's 1693 book "Some Thoughts Concerning Education"
John Locke's book Some Thoughts Concerning Education from 1693 is one of the foundational works of education studies.

The main discipline investigating education is called education studies, also referred to as education sciences. It tries to determine how people transmit and acquire knowledge by studying the methods and forms of education. It is interested in its aims, effects, and value as well as the cultural, societal, governmental, and historical contexts that shape education. Education theorists integrate insights from many other fields of inquiry, including philosophy, psychology, sociology, economics, history, politics, and international relations. Because of these influences, some theorists claim that education studies is not an independent academic discipline like physics or history since its method and subject are not as clearly defined. Education studies differs from regular training programs, such as teacher training, since its focus on academic analysis and critical reflection goes beyond the skills needed to be a good teacher. It is not restricted to the topic of formal education but examines all forms and aspects of education.

Various research methods are used to study educational phenomena. They can roughly be divided into quantitative, qualitative, and mixed-methods approaches. Quantitative research emulates the methods found in the natural sciences by using precise numerical measurements to gather data from many observations and employs statistical tools to analyze it. It aims to arrive at an objective and impersonal understanding. Qualitative research usually has a much smaller sample size and tries to get an in-depth insight into more subjective and personal factors, like how different actors experience the process of education. Mixed-methods research aims to combine data gathered from both approaches to arrive at a balanced and comprehensive understanding. Data can be gathered in various ways, like using direct observation or test scores as well as interviews and questionnaires. Research can be employed to study basic factors affecting all forms of education, examine specific applications, look for solutions to concrete problems, and evaluate the effectiveness of projects.

Subfields

Education studies encompasses various subfields like philosophy of education, pedagogy, psychology of education, sociology of education, economics of education, comparative education, and history of education. The philosophy of education is the branch of applied philosophy that examines many of the basic assumptions underlying the theory and practice of education. It studies education both as a process and as a discipline while trying to provide exact definitions of its nature and how it differs from other phenomena. It further studies the purpose of education and its types as well as how to conceptualize teachers, students, and their relation. It includes educational ethics, which examines various moral issues in relation to education, for example, what ethical principles underlie it and how teachers should apply them to specific cases. The philosophy of education has a long history and was already discussed in ancient Greek philosophy.

The term "pedagogy" is sometimes used as a synonym for education studies but when understood in a more restricted sense, it refers to the subfield interested in teaching methods. It studies how the aims of education, like the transmission of knowledge or fostering skills and character traits, can be realized. It is interested in the methods and practices used for teaching in regular schools and some researchers restrict it to this domain. But in a wider sense, it covers all types of education, including forms of teaching outside schools. In this general sense, it explores how teachers can bring about experiences in learners to advance their understanding of the studied topic and how the learning itself takes place.

The psychology of education studies how education happens on the mental level, specifically how new knowledge and skills are acquired as well as how personal growth takes place. It studies the factors responsible for successful education and how these factors may differ from person to person. Important factors include intelligence, motivation, and personality. A central topic in this field is the interplay between nature and nurture and how it affects educational success. Influential psychological theories of education are behaviorism, cognitivism, and constructivism. Closely related fields are the neurology of education and educational neuroscience, which are interested in the neuropsychological processes and changes brought about through learning.

The sociology of education is concerned with how social factors influence education and how it leads to socialization. Social factors differ from mental factors studied by psychology and include aspects like socioeconomic status, ethnicity, and gender. The sociology of education studies how these factors, together with the dominant ideology in society, affect what kind of education is available to a person and how successful they are. Closely related questions include how education affects different groups in society and how educational experiences can form someone's personal identity. The sociology of education is interested in aspects that result in inequalities and is relevant to education policy, for example, when trying to identify what causes inequality and how to reduce it. Two influential schools of thought are consensus theory and conflict theory. Consensus theorists hold that education benefits society as a whole by preparing people for their roles. Conflict theories have a more negative outlook on the resulting inequalities and see education as a force used by the ruling class to promote their own agenda.

The economics of education is the field of inquiry studying how education is produced, distributed, and consumed. It tries to determine how resources should be used to improve education. An example is the question to what extent the quality of teachers is increased by raising their salary. Other questions are how smaller class sizes affect educational success and how to invest in new educational technologies. In this regard, it helps policy-makers decide how to distribute the limited resources most efficiently to benefit society as a whole. It also tries to understand what long-term role education plays for the economy of a country by providing a highly skilled labor force and increasing its competitiveness. A closely related issue concerns the economic advantages and disadvantages of different systems of education.

world map comparing different countries by their education index
Comparative education makes use of tools like education indices to compare systems of education in different countries.

Comparative education is the discipline that examines and contrasts systems of education. Comparisons can happen from a general perspective or focus on specific factors, like social, political, or economic aspects. It is often applied to different countries to assess the similarities and differences of their educational institutions and practices as well as to evaluate the consequences of the distinct approaches. It can be used to learn from other countries which education policies work and how one's own system of education may be improved. This practice is known as policy borrowing. It comes with many difficulties since the success of policies can depend to a large degree on the social and cultural context of students and teachers. A closely related and controversial topic concerns the question of whether the educational systems of developed countries are superior and should be exported to less developed countries. Other key topics are the internationalization of education and the role of education in transmitting from an authoritarian regime to a democracy.

The history of education examines the evolution of educational practices, systems, and institutions. It discusses various key processes, their possible causes and effects, and their relations to each other.

Aims and ideologies

A central topic in education studies concerns questions like why people should be educated and what goals should guide this process. Many aims of education have been suggested. On a basic level, education is about the acquisition of knowledge and skills but may also include personal development and fostering of character traits. Common suggestions encompass features like curiosity, creativity, rationality, and critical thinking as well as the tendency to think, feel, and act morally. Some scholars focus on liberal values linked to freedom, autonomy, and open-mindedness. But others prioritize qualities like obedience to authority, ideological purity, piety, and religious faith. An important discussion in this regard is about the role of critical thinking. It asks to what extent indoctrination forms part of education. On a social level, it is often stressed that education should socialize people. This way, it turns them into productive members of society while promoting good citizenship and preserving cultural values. A controversial issue in this regard concerns who primarily benefits from education: the educated person, society as a whole, or dominant groups within society.

Educational ideologies are systems of basic philosophical assumptions and principles. They cover various additional issues besides the aims of education, like what topics are learned and how the learning activity is structured. Other topics include the role of the teacher and how the results are to be assessed. They also include claims on how to structure the institutional framework and policies. There are many ideologies and they often overlap in various ways. For example, teacher-centered ideologies place the main emphasis on the teacher's role in transmitting knowledge to students. Student-centered ideologies give a more active role to the students in the process. Product-based ideologies discuss education from the perspective of the result to be achieved. They contrast with process-based ideologies, which focus on the processes of teaching and learning themselves. Another classification contrasts progressivism with more traditional and conservative ideologies. Further categories are humanism, romanticism, essentialism, encyclopaedism, and pragmatism. There are also distinct types for authoritarian and democratic ideologies.

Learning theories and teaching

Learning theories try to explain how learning happens. Influential theories are behaviorism, cognitivism, and constructivism. Behaviorism understands learning as a change in behavior in response to environmental stimuli. This happens by presenting the learner with a stimulus, associating this stimulus with the desired response, and solidifying this stimulus-response pair. Cognitivism sees learning as a change in cognitive structures and focuses on the mental processes involved in storing, retrieving, and processing information. According to constructivism, learning is based on the personal experience of each individual. It puts more emphasis on social interactions and how they are interpreted by the learner. These theories have important implications for how to teach. For example, behaviorists tend to focus on drills while cognitivists may advocate the use of mnemonics and constructivists tend to employ collaborative learning strategies.

An influential developmental theory of learning is due to Jean Piaget. He outlines four stages of learning through which children pass on their way to adulthood. They are the sensorimotor, the pre-operational, the concrete operational, and the formal operational stage. They correspond to different levels of abstraction. Early stages focus more on simple sensory and motor activities. Later stages include more complex internal representations and information processing in the form of logical reasoning. Various theories suggest that learning is more efficient when it is based on personal experience. An additional factor is to aim at a deeper understanding by connecting new to pre-existing knowledge rather than merely memorizing a list of unrelated facts.

The teaching method concerns the way the content is presented by the teacher, for example, whether group work is used instead of a focus on individual learning. There are many teaching methods available. Which one is most efficient in a case depends on various factors, like the subject matter as well as the learner's age and competence level. This is reflected in the fact that modern school systems organize students by age, competence, specialization, and native language into different classes to ensure a productive learning process. Different subjects frequently use very different approaches. For example, language education often focuses on verbal learning. Mathematical education, on the other hand, is about abstract and symbolic thinking together with deductive reasoning. One central requirement for teaching methodologies is to ensure that the learner remains motivated, for example, because of interest and curiosity or through external rewards.

Further aspects of teaching methods include the instructional media used, such as books, worksheets, and audio-visual recordings, and having some form of test or assessment to evaluate the learning progress. An important pedagogical aspect in many forms of modern education is that each lesson is part of a larger educational enterprise governed by a syllabus. It often covers several months or years. According to Herbartianism, teaching is divided into phases. The initial phase consists of preparing the student's mind for new information. Next, new ideas are first presented to the learner and then associated with ideas with which the learner is already familiar. In later phases, the understanding shifts to a more general level behind the specific instances and the ideas are then put into concrete practice.

History

The history of education studies the processes, methods, and institutions involved in teaching and learning. It tries to explain how they have interacted with each other and shaped educational practice until the present day. Education began in prehistory, as adults trained the young in the knowledge and skills deemed necessary in their society. For the most part, there were no specialized teachers and most adults taught the youth, usually informally during everyday activities. Education was achieved through oral communication and imitation. It could take the form of storytelling and singing to pass knowledge, values, and skills from one generation to the next.

The earliest ancient civilizations developed in the period from 3000 to 1500 BCE in Egypt, Mesopotamia, and North China. Ancient education was characterized by the invention of writing and the development of formal education. The invention of writing had a significant influence on the history of education as a whole. Through writing, it was possible to store and preserve information and make it accessible to more people. This enabled various subsequent developments, for example, the creation of educational tools, like textbooks, and institutions, like schools.

Mosaic from Pompeii depicting Plato's Academy
Plato's Academy is often seen as the first school of higher learning. (Mosaic from Pompeii).

Another key aspect of ancient education was the establishment of formal education. This became necessary since the amount of knowledge grew as civilizations evolved and informal education proved insufficient to transmit all knowledge from one generation to the next. Teachers would act as specialists to impart knowledge and education became more abstract and further removed from daily life. Formal education was still quite rare in ancient societies and was restricted to the intellectual elites. It happened in the form of training scribes and priests and covered various subjects besides reading and writing, including the humanities, science, medicine, mathematics, law, and astrology. Plato's Academy in Ancient Greece is often mentioned as one of the noteworthy achievements of ancient education. It is frequently described as the first institute of higher education. Another achievement is the creation of the Great Library of Alexandria in Ancient Egypt. Many see it as the most prestigious library of the ancient world.

In the medieval period, religious authorities had a lot of influence over formal education. This applied specifically to the role of the Catholic Church in Europe. But it is also seen in the Muslim world. Education there focused on the study of the Quran and its interpretations but also included knowledge of the sciences and the arts. Additionally, this period saw the establishment of universities as concentrated centers of higher education and research. The first universities were the University of Bologna, the University of Paris, and Oxford University. Another key development was the creation of guilds. Guilds were associations of skilled craftsmen and merchants who controlled the practice of their trades. They were responsible for vocational education and new members had to pass through different stages on their way to masterhood.

A woodcut from 1568 showing an old printing press
The invention of the printing press made written media widely available and led to a significant increase in general literacy.

The invention and popularization of the printing press in the middle of the 15th century by Johann Gutenberg had a profound impact on general education. It significantly reduced the cost of producing books, which were hand-written before, and thereby augmented the dissemination of written documents, including new forms like newspapers and pamphlets. The increased availability of written media had a significant influence on the general literacy of the population.

These changes prepared the rise of public education in the 18th and 19th centuries. This period saw the establishment of publicly funded schools with the aim of providing education for all. This contrasts with earlier periods, when formal education was primarily provided by private institutions, religious institutions, and individual tutors. Aztec civilization was an exception in this regard since formal education was mandatory for the youth regardless of social class as early as the 14th century. Closely related changes were to make education compulsory and free of charge for all children up to a certain age. Initiatives to promote public education and universal access to education made significant progress in the 20th and the 21st centuries and were promoted by intergovernmental organizations like the UN. Examples include the Universal Declaration of Human Rights, the Convention on the Rights of the Child, the Education for All initiative, the Millennium Development Goals, and the Sustainable Development Goals. These efforts resulted in a steady rise of all forms of education but affected primary education in particular. For example, in 1970, 28% of all primary-school-age children worldwide did not attend school while by 2015, this number dropped to 9%.

A side effect of the establishment of public education was the introduction of standardized curricula for public schools as well as standardized tests to assess the students' progress. It also affected teachers by setting in place institutions and norms to guide and oversee teacher training, for example, by establishing certification standards for teaching at public schools.

A further influence on contemporary education was the emergence of new educational technologies. For example, the widespread availability of computers and the internet dramatically increased access to educational resources and made new types of education possible, such as online education. This was of particular relevance during the COVID-19 pandemic. Schools all around the world had to close for extended periods. Many offered remote learning through video conferencing or pre-recorded video lessons to continue instruction. A further contemporary factor is the increased globalization and internationalization of education.

Delayed-choice quantum eraser

From Wikipedia, the free encyclopedia https://en.wikipedia.org/wiki/Delayed-choice_quantum_eraser A delayed-cho...