Master Linux System Commands: crypt, kill, shred, zombies, at & daemons Explained
This article introduces essential Linux commands—including crypt for file encryption, kill variants for terminating processes, shred for secure deletion, zombie process identification, the at scheduler, and daemon management—explaining their usage, options, and practical examples for effective system administration.
We have always had the crypt command, which encrypts file contents rather than acting as a trash bin.
Nowadays crypt is often implemented as a script that calls the mcrypt binary to emulate the older command; using mycrypt directly is a better choice.
$ 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: the mcrypt command 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 terminates processes, with the force level depending on the signal used. Linux provides several related commands such as pkill, killall, killpg, rfkill, skill, tgkill, tkill, and xkill.
$ killall runme
[1] Terminated ./runme
[2] Terminated ./runme
[3]- Terminated ./runme
[4]+ Terminated ./runmeshred
The shred command overwrites a file to hide its previous contents, making recovery with disk tools impossible. Unlike rm, which only removes the file reference, shred securely erases the data.
$ shred dupes.txt
$ more dupes.txt
▒oΛ▒▒9▒lm▒▒▒▒▒o▒1־▒▒f▒f▒▒▒i▒▒h^}&▒▒▒{▒▒zombies
Zombie processes are remnants of dead processes that have not been fully cleaned up. Their presence indicates a flaw in the parent process. You can check for zombies using 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 Memat midnight
The at command schedules a one‑time task to run at a specified time, similar to a single‑run cron job.
$ 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 2017daemons
Linux relies heavily on background processes called daemons , which provide many system functions. Daemon names often end with a “d”, indicating they run continuously.
$ 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/accoProgrammer DD
A tinkering programmer and author of "Spring Cloud Microservices in Action"
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
