On this page
System and processes
This topic gathers the commands that deal with the running system rather than with files: reading the time, asking what hardware and system you are on, launching another command under some constraint, signalling a process, working with the terminal.
This page is the map.
The commands
Time
| Command | Purpose |
|---|---|
date |
Print — or set — the system date and time. |
sleep |
Pause for a given length of time. |
uptime |
Show how long the system has been running. |
Running a command under a constraint
| Command | Purpose |
|---|---|
timeout |
Run a command, and kill it if it runs too long. |
nohup |
Run a command so it survives the terminal closing. |
nice |
Run a command at an adjusted scheduling priority. |
stdbuf |
Run a command with altered stream buffering. |
chroot |
Run a command with a different directory as its root. |
Signalling processes
| Command | Purpose |
|---|---|
kill |
Send a signal to a process. |
System identity and capacity
| Command | Purpose |
|---|---|
uname |
Print system information — the OS, the kernel, the machine. |
arch |
Print the machine's hardware architecture. |
hostname |
Display — or set — the system's host name. |
hostid |
Print the host's numeric identifier. |
nproc |
Print how many processor cores are available. |
Storage and terminal
| Command | Purpose |
|---|---|
sync |
Flush cached writes out to persistent storage. |
tty |
Print the name of the terminal on standard input. |
stty |
Display or change terminal settings. |
A note on changing the system
Most commands here only report. A few can change the running system — date can set the clock, hostname can set the host name. Changing system-wide state is a privileged operation: it succeeds only for a caller whose token holds the right to do it, and is refused otherwise. The pages for those commands say so where it applies, and Privileges is the full picture.
Where to start
uname answers "what am I running on?". kill is the one to read carefully — sending the wrong signal to the wrong process is a quick way to lose work.