# Linux
## User Switching
```bash
sudo -u user command # run command as another user
```
## Job Control
See [[Bash and Zsh#Job Control]] — covers `jobs`, `bg`, `fg`, `disown`, and `Ctrl+Z`.
## Pipes — stderr vs stdout
```bash
command 2>&1 | next # pipe both stdout and stderr
command 2>/dev/null # discard stderr
command 2>&1 1>/dev/null # pipe only stderr
```
## Terminal Messaging
### wall — Broadcast Messages
```bash
wall "System going down in 10 minutes"
wall /path/to/message.txt
```
| Option | Description |
|--------|-------------|
| `-n, --nobanner` | Suppress sender/date banner |
| `-t, --timeout <s>` | Max wait per terminal write (default: 300) |
| `-g, --group <grp>` | Send only to group members |
Only superusers can write to terminals of users who blocked messages. Lines wrap at 79 characters.
### mesg — Control Message Reception
```bash
mesg # show current status
mesg y # allow messages
mesg n # block messages
```
### talk — Interactive Chat
Split-screen terminal chat between two users:
```bash
talk username # same machine
talk user@host # remote host
```
- `Ctrl+L` — repaint screen
- `Ctrl+C` — exit conversation
The recipient must have `mesg y` enabled.
---
See also: [[VPS Setup]]