Wall (Unix)

Last updated
wall
Developer(s) AT&T Bell Laboratories
Initial releaseMay 1975;48 years ago (1975-05)
Operating system Unix and Unix-like
Type Command

wall (an abbreviation of write to all) is a Unix command-line utility that displays the contents of a computer file or standard input to all logged-in users. It is typically used by root to send out shutting down message to all users just before poweroff.

Contents

Invocation

wall reads the message from standard input by default when the filename is omitted. This is done by piping the output of the echo command:

alice@sleipnir:~$ # `tty`toshowthecurrentterminalname alice@sleipnir:~$ tty /dev/pts/7alice@sleipnir:~$ echoRemembertobrushyourteeth!|wall 

The message may also be typed in much the same way cat is used: invoking wall by typing wall and pressing ↵ Enter followed by a message, pressing ↵ Enter and Ctrl+D:

alice@sleipnir:~$ wall Remember to brush your teeth!^D

Using a here-string:

alice@sleipnir:~$ wall<<<'Remember to brush your teeth!'

Reading from a file is also supported:

alice@sleipnir:~$ cat.important_announcement Remember to brush your teeth!alice@sleipnir:~$ wall.important_announcement# same as `wall !$`

All the commands above should display the following output on terminals that users allow write access to (see mesg(1)):

Broadcast Message from alice@sleipnir  (/dev/pts/7) at 16:15 ...Remember to brush your teeth!

See also

Related Research Articles

In telecommunication, an End-of-Transmission character (EOT) is a transmission control character. Its intended use is to indicate the conclusion of a transmission that may have included one or more texts and any associated message headings.

<span class="mw-page-title-main">Terminal emulator</span> Program that emulates a video terminal

A terminal emulator, or terminal application, is a computer program that emulates a video terminal within some other display architecture. Though typically synonymous with a shell or text terminal, the term terminal covers all remote terminals, including graphical interfaces. A terminal emulator inside a graphical user interface is often called a terminal window.

In computer programming, standard streams are interconnected input and output communication channels between a computer program and its environment when it begins execution. The three input/output (I/O) connections are called standard input (stdin), standard output (stdout) and standard error (stderr). Originally I/O happened via a physically connected system console, but standard streams abstract this. When a command is executed via an interactive shell, the streams are typically connected to the text terminal on which the shell is running, but can be changed with redirection or a pipeline. More generally, a child process inherits the standard streams of its parent process.

<span class="mw-page-title-main">Computer terminal</span> Computer input/output device for users

A computer terminal is an electronic or electromechanical hardware device that can be used for entering data into, and transcribing data from, a computer or a computing system. The teletype was an example of an early-day hard-copy terminal and predated the use of a computer screen by decades.

<span class="mw-page-title-main">Not a typewriter</span> Unix error code

In computing, "Not a typewriter" or ENOTTY is an error code defined in the errno.h found on many Unix systems. This code is now used to indicate that an invalid ioctl number was specified in an ioctl system call.

dd is a command-line utility for Unix, Plan 9, Inferno, and Unix-like operating systems and beyond, the primary purpose of which is to convert and copy files. On Unix, device drivers for hardware and special device files appear in the file system just like normal files; dd can also read and/or write from/to these files, provided that function is implemented in their respective driver. As a result, dd can be used for tasks such as backing up the boot sector of a hard drive, and obtaining a fixed amount of random data. The dd program can also perform conversions on the data as it is copied, including byte order swapping and conversion to and from the ASCII and EBCDIC text encodings.

<span class="mw-page-title-main">Redirect (computing)</span> Form of interprocess communication

In computing, redirection is a form of interprocess communication, and is a function common to most command-line interpreters, including the various Unix shells that can redirect standard streams to user-specified locations.

ps (Unix) Standard UNIX utility that displays the currently-running processes

In most Unix and Unix-like operating systems, the ps program displays the currently-running processes. A related Unix utility named top provides a real-time view of the running processes.

<span class="mw-page-title-main">Pseudoterminal</span>

In some operating systems, including Unix and Linux, a pseudoterminal, pseudotty, or PTY is a pair of pseudo-device endpoints (files) which establish asynchronous, bidirectional communication (IPC) channel between two or more processes. The master provides means by which a terminal emulator process controls the slave. The slave emulates a hardware text terminal device. PTY are similar to bidirectional pipes.

who (Unix)

The standard Unix command who displays a list of users who are currently logged into the computer.

<span class="mw-page-title-main">Comparison of command shells</span>

A command shell is a command-line interface to interact with and manipulate a computer's operating system.

In Unix and Unix-like operating systems, write is a utility used to send messages to another user by writing a message directly to another user's TTY.

In computing, tee is a command in command-line interpreters (shells) using standard streams which reads standard input and writes it to both standard output and one or more files, effectively duplicating its input. It is primarily used in conjunction with pipes and filters. The command is named after the T-splitter used in plumbing.

mesg is a Unix command that sets or reports the permission other users have to write to the current user's terminal using the talk and write commands.

In Unix-like operating systems, a device file or special file is an interface to a device driver that appears in a file system as if it were an ordinary file. There are also special files in DOS, OS/2, and Windows. These special files allow an application program to interact with a device by using its device driver via standard input/output system calls. Using standard system calls simplifies many programming tasks, and leads to consistent user-space I/O mechanisms regardless of device features and functions.

Toybox is a free and open-source software implementation of over 200 Unix command line utilities such as ls, cp, and mv. The Toybox project was started in 2006, and became a 0BSD licensed BusyBox alternative. Toybox is used for most of Android's command line tools in all currently supported Android versions, and is also used to build Android on Linux and macOS. All of the tools are tested on Linux, and many of them also work on BSD and macOS.

<span class="mw-page-title-main">Command-line interface</span> Computer interface that uses text

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.

cat (Unix) Unix command utility

cat is a standard Unix utility that reads files sequentially, writing them to standard output. The name is derived from its function to (con)catenate files. It has been ported to a number of operating systems.

devpts

devpts is a virtual filesystem directory available in the Linux kernel since version 2.1.93. It is normally mounted at /dev/pts and contains solely devices files which represent slaves to the multiplexing master located at /dev/ptmx which in turn is used to implement terminal emulators.

In computing, tty is a command in Unix and Unix-like operating systems to print the file name of the terminal connected to standard input.

References