Updated: 22 October 2026 · Applies to: bash on Ubuntu 24.04 (strace 6.8, ImageMagick 6.9.12, coreutils 9.4) and AlmaLinux 10.2; fsck notes for systemd 258 and later

These are ten commands most Linux users never meet but that solve real problems on a server: strace shows what a program is doing, disown keeps a job alive after you log out, getconf LONG_BIT tells you if the system is 32 or 64-bit, and the rest cover a terminal clock, text-to-image, DNS lookups, live resource stats, bash shortcuts and forcing a disk check. We ran the examples on Ubuntu 24.04 and AlmaLinux 10.2; the boot-time disk check in section 10 follows systemd's documentation.

1. strace: see the system calls a command makes

Use strace when a program fails without a useful message: it prints every system call, so you can see which file it could not open or which permission it lacked. Install it with apt install strace or dnf install strace, then run:

strace pwd

Output (first lines only; a full run prints many more):

execve("/usr/bin/pwd", ["pwd"], 0x7ffc355439b0 /* 7 vars */) = 0
brk(NULL)                               = 0x558409894000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f2d2ab1e000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=12055, ...}) = 0
mmap(NULL, 12055, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f2d2ab1b000
close(3)                                = 0

Lines that end in -1 ENOENT or -1 EACCES are the ones to look at: a missing file or a permission problem. For a summary table of calls instead of the full list, use strace -c.

2. disown: keep a job running after you close the terminal

If you started a long job in the background and now need to log out, disown removes it from the shell's job list, so bash does not send it the hang-up signal when you exit:

long-running-command &
jobs
disown %1

Replace %1 with the job number that jobs shows. In our test, jobs was empty after disown and the process was still running in ps. If you know in advance that a job must survive logout, start it with nohup, or run it inside tmux or screen so you can reconnect to it later.

3. getconf LONG_BIT: check for 32-bit or 64-bit

getconf LONG_BIT

Output:

64

It prints 32 or 64 for the installed system. uname -m shows the machine type (for example x86_64).

4. A live clock in the corner of the terminal

while sleep 1; do tput sc; tput cup 0 $(($(tput cols)-29)); date; tput rc; done &

Every second this saves the cursor position, moves to the top right corner, prints the date and time, and puts the cursor back, so you keep typing normally. Stop it with kill %1 (or the job number jobs shows).

5. Turn command output into an image

Useful for documentation when you need a picture of some output. With ImageMagick installed, this saves the output of tree as a PNG:

convert label:"$(tree)" tree.png

Older guides use tree | convert label:@- tree.png. On Ubuntu 24.04 that fails, because the security policy ImageMagick ships with blocks reading text through @:

Output:

convert-im6.q16: attempt to perform an operation not allowed by the security policy `@-' @ error/property.c/InterpretImageProperties/3771.

Passing the text directly, as in the first command, avoids the policy and worked in our test.

6. A big ASCII clock with figlet

Install figlet (apt install figlet; on AlmaLinux and Rocky it comes from EPEL), then run:

watch -t -n1 "date +%T | figlet"

The time redraws once a second in large letters. Press Ctrl+C to quit.

7. host and dig: quick DNS lookups

Both are in the bind9-host and bind9-dnsutils packages on Debian and Ubuntu, and in bind-utils on AlmaLinux and Rocky.

host example.com

host prints the IPv4 and IPv6 addresses and the mail server in plain sentences. For one record type in a short form, use dig:

dig +short example.com A

The addresses you get depend on the domain and can change, so always run it against the domain you are checking.

8. Live CPU, disk, network and memory statistics

dstat shows CPU, disk, network, paging and system counters side by side, one line per second. The original dstat is no longer packaged in Debian 13 or Ubuntu 24.04 (apt finds no candidate). On AlmaLinux, Rocky and RHEL, dnf install dstat installs pcp-system-tools, which provides a compatible dstat command. To show two one-second samples:

dstat 1 2

Output on our AlmaLinux 10.2 lab container (a lab example, not Ucartz server performance):

You did not select any stats, using -ucdngy by default.
-system- ----total-usage---- -dsk/total- -net/total- ---paging-- ---system--
 times  |usr sys idl wai stl| read  writ| recv  send|  in   out | int   csw 
14:17:39|                   |           |           |           |           
14:17:40| 38   2   0   0  60|4096B    0 |   0     0 |   0     0 | 509   941 
14:17:41| 38   2   0   0  60|   0     0 |   0     0 |   0     0 | 510   959 

On Debian and Ubuntu, vmstat 1 (from the procps package) gives similar CPU, memory and I/O figures every second.

9. bind -p: list bash keyboard shortcuts

bind -p

It lists every key binding bash knows. A few useful ones from our run:

Output:

"\C-a": beginning-of-line
"\C-e": end-of-line
"\C-r": reverse-search-history
"\C-u": unix-line-discard
"\C-w": unix-word-rubout

\C-a means Ctrl+A. Ctrl+R searches your command history, which saves a lot of typing.

10. Force a file system check on the next boot

The old trick was to create an empty /forcefsck file and reboot. systemd 258 and later ignore that file (Ubuntu 26.04 ships systemd 259), so it is not a reliable method any more. According to systemd's documentation, add fsck.mode=force to the kernel command line instead; it "unconditionally results in full file system checks". For a single boot, press e at the GRUB menu, add fsck.mode=force to the end of the line that starts with linux, and press Ctrl+X to boot.

When you check a file system by hand, unmount it first and always use -f, because plain fsck can report a damaged ext4 file system as clean:

fsck -f /dev/sdb1

Replace /dev/sdb1 with your partition. Our guide fsck in Linux and Ubuntu: Run It Manually, Options and NTFS covers the options in detail.

Official documentation: systemd-fsck and Bash Reference Manual.

Related services

KVM VPS hosting

NVMe SSD and full root access, with Free Basic Managed Support.

Unmanaged dedicated servers

full root access and free IPMI KVM, with Free Basic Managed Support.

Managed dedicated servers

our engineers look after the server for you, from $135 a month.

Was this answer helpful?

Still stuck? Open a ticket