Operations 7 min read

Understanding Common Linux Commands: crypt, kill, shred, zombies, at, and daemons

This article introduces several essential Linux commands—including crypt for file encryption, kill variants for terminating processes, shred for secure file deletion, zombie process identification, at for one‑time scheduling, and daemon management—explaining their purposes, usage syntax, and practical examples.

Laravel Tech Community
Laravel Tech Community
Laravel Tech Community
Understanding Common Linux Commands: crypt, kill, shred, zombies, at, and daemons

crypt

We have always had the crypt command, which encrypts file contents rather than merely storing junk files. Modern implementations invoke the mcrypt binary to simulate the older crypt command, though using mycrypt directly is often preferable.

$ mcrypt x
Enter the passphrase (maximum of 512 characters)
Please use a combination of upper and lower case letters and numbers.
Enter passphrase:
Enter passphrase:
File x was encrypted.

Note that mcrypt creates a second file with the .nc extension and does not overwrite the original file. It offers options for key size and encryption algorithm, though specifying the key directly is discouraged.

kill

The kill command (not to be confused with homicide) terminates processes, with the strength of termination depending on the signal used. Linux provides many variants such as kill, pkill, killall, killpg, rfkill, skill, tgkill, tkill, and xkill.

$ killall runme

[1] Terminated ./runme
[2] Terminated ./runme
[3]- Terminated ./runme
[4]+ Terminated ./runme

shred

The shred command overwrites a file to hide its previous contents and makes recovery with disk‑recovery tools practically impossible. Unlike rm, which merely removes directory entries, shred securely destroys the data.

$ shred dupes.txt

$ more dupes.txt

▒oΛ▒▒9▒lm▒▒▒▒▒o▒1־▒▒f▒f▒▒▒i▒▒h^}&▒▒▒{▒▒

zombies

Zombie processes are the remnants of dead processes that have not been fully reaped. Their presence indicates a flaw in the parent process that failed to clean up after its children. You can spot zombies in the output of the top command.

$ top

top - 18:50:38 up 6 days, 6:36, 2 users, load average: 0.00, 0.00, 0.00

Tasks: 171 total, 1 running, 167 sleeping, 0 stopped, 3 zombie <==
%Cpu(s): 0.0 us, 0.0 sy, 0.0 ni, 99.9 id, 0.1 wa, 0.0 hi, 0.0 si, 0.0 st

KiB Mem : 2003388 total, 250840 free, 545832 used, 1206716 buff/cache

KiB Swap: 9765884 total, 9765764 free, 120 used. 1156536 avail Mem

at midnight

The at command schedules a one‑time task to run at a specified time, similar to a single‑run cron job. For example, the following schedules a command to echo a message at midnight.

$ at midnight

warning: commands will be executed using /bin/sh
at> echo 'the spirits of the dead have left'

at> <EOT>

job 3 at Thu Oct 31 00:00:00 2017

daemons

Linux relies heavily on background services called daemons, which provide many system functions. Daemon names often end with a trailing "d" (e.g., sshd), indicating they run continuously. You can list daemon processes with commands like:

$ ps -ef | grep sshd

root 1142 1 0 Oct19 ? 00:00:00 /usr/sbin/sshd -D

root 25342 1142 0 18:34 ? 00:00:00 sshd: shs [priv]

$ ps -ef | grep daemon | grep -v grep

message+ 790 1 0 Oct19 ? 00:00:01 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation

root 836 1 0 Oct19 ? 00:00:02 /usr/lib/accountsservice/accounts-daemon

These commands illustrate how to inspect and manage essential system services.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

encryptioncommand-linesystem-administrationprocess-management
Laravel Tech Community
Written by

Laravel Tech Community

Specializing in Laravel development, we continuously publish fresh content and grow alongside the elegant, stable Laravel framework.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.