Unlock Linux’s Dark Side: Master Crypt, Kill, Shred, and More
This guide explores several powerful yet intimidating Linux commands—including crypt, kill, shred, zombie process detection, at midnight scheduling, and daemon management—explaining their purposes, usage nuances, and safety considerations for system administrators and power users.
It’s time to pay attention to the scary side of Linux.
crypt
We’ve always had crypt , a command that encrypts file contents rather than merely storing junk files.
Nowadays crypt is often implemented as a script that calls the mcrypt binary to emulate the older crypt 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: mcrypt creates a second file with the “.nc” extension and does not overwrite the original.
kill
The kill command terminates processes; the forcefulness depends 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 ./runmeshred
The shred command overwrites a file to hide its previous contents, making recovery with disk tools impossible. Unlike rm, which merely removes directory entries, shred actually destroys 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 haven’t been fully cleaned up, indicating a flaw in the parent process.
Check for zombies with the top command; the task line will show “zombie”.
$ 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 midnight 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 services called daemons. Many daemon names end with a “d”, indicating they run continuously to provide essential functionality.
$ 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-daemonSigned-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
MaGe Linux Operations
Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.
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.
