• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

wall Command Examples in Linux

by Deepika

The wall command is a Unix/Linux utility that allows users to write a message on the terminals of all the currently logged-in users. It is typically used by system administrators to broadcast important messages to all users, such as system shutdowns, emergency alerts, or system updates.

The wall command works by reading the message from standard input or from a file specified as an argument, and then sending it to the terminals of all currently logged-in users. The message is displayed on each user’s terminal in a banner format, with the message enclosed in a header and footer that includes the sender’s name and the time the message was sent.

By default, the wall command is restricted to users with root privileges or members of the tty group, which allows users to access the system’s terminals. This is to prevent unauthorized users from sending messages to other users’ terminals.

The wall command can be used in a variety of situations, such as when a system administrator needs to broadcast important information to all users, or when a user needs to communicate with other users who are currently logged in. However, it is important to use the wall command judiciously, as it can be disruptive or annoying to users if used excessively or for non-critical messages.

wall Command Examples

1. Send a message:

# echo "message" | wall

2. Send a message from a file:

# wall file

3. Send a message with timeout (default 300):

# wall -t seconds file

Summary

Overall, the wall command is a useful utility for broadcasting important messages to all currently logged-in users, and can be a valuable tool for system administrators and users who need to communicate with other users on the system.

Filed Under: Linux

Some more articles you might also be interested in …

  1. lsb_release Command Examples in Linux
  2. Understanding the dm-multipath Configuration file /etc/multipath.conf
  3. CentOS / RHEL 6 : How to password protect grub (Password-Protected Booting)
  4. paru Command Examples in Linux
  5. Most commonly performed operations in Yocto
  6. How to create snapshot of LVM thin volumes using snapper command
  7. How to disable NUMA on EFI Boot Loaders using GRUB2 (CentOS/RHEL 6)
  8. Time to live exceeded ping error
  9. Linux OS Service ‘ntpd’
  10. mountstats Command Examples in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • aws ec2: CLI for AWS EC2 (Command Examples)
  • aws cur – Create, query, and delete AWS usage report definitions (Command Examples)
  • aws configure – Manage configuration for the AWS CLI (Command Examples)
  • aws cognito-idp: Manage Amazon Cognito user pool and its users and groups using the CLI

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright