Scary Halloween Linux Commands | Linux UK

640?wx_fmt=jpeg&wxfrom=5&wx_lazy=1 What commands might show images of ghosts, witches, and zombies? Which encourages the "trick or treat" spirit? -- Sandra Henry-stocker

Useful Links to Original Articles Please visit " Original Links " at the end of the article for clickable in-text links, full-size original images and related articles.

Acknowledgments Compiled from | https://www.networkworld.com/article/3235219/linux/scary-linux-commands-for-halloween.html  
 Author | Sandra Henry-stocker
 Translator | geekpi ? ? Total translation: 696  contributions : 1635 days

While it's not Halloween, pay attention to the scary side of Linux. What commands might show images of ghosts, witches, and zombies? Which encourages the "trick or treat" spirit?

crypt

Well, we see it all the time  crypt. Despite its different name, crypt is not a cellar, nor a burial pit of junk files, but a command that encrypts the contents of a file. Now, this crypt is usually implemented with a script that   does its job by invoking a mcrypt binary called simpy to emulate the previous  command. cryptUsing the  mycryptcommand directly is a better option.

 
  
  1. $ mcrypt x

  2. Enter the passphrase (maximum of 512 characters)

  3. Please use a combination of upper and lower case letters and numbers.

  4. Enter passphrase:

  5. Enter passphrase:

  6. File x was encrypted.

Note that the mcrypt command creates a file with a second extension  .nc . It will not overwrite the file you are encrypting.

mcrypt The command has options for key size and encryption algorithm. You can also specify keys in options, but  mcrypt this is discouraged by the command.

kill

There are also  kill commands - certainly not referring to murder, but are used to forcibly and non-coercively end processes, depending on the requirement to terminate them properly. Of course, Linux doesn't stop there. Instead, it has various  kill commands to kill the process. We have  kill, pkill, killall, killpg, rfkill, skill( ) (pronounced es-kill), tgkill, tkill and  xkill.

 
  
  1. $ killall runme

  2. [1] Terminated ./runme

  3. [2] Terminated ./runme

  4. [3]- Terminated ./runme

  5. [4]+ Terminated ./runme

shred

Linux systems also support a  shred command called . shred The command overwrites files to hide their previous contents and ensure they cannot be recovered using hard drive recovery tools. Remember that the rm command basically just removes the file's reference in the directory file, but doesn't necessarily delete the content from disk or overwrite it. shred The command overwrites the contents of the file.

 
  
  1. $ shred dupes.txt

  2. $ more dupes.txt

  3. oΛ▒▒9lm▒▒▒▒▒o1־▒▒ff▒▒▒i▒▒h^}&▒▒▒{▒▒

zombie

Although not a command, zombies are very persistent on Linux systems. Zombies are basically the remains of dead processes that haven't been cleaned up completely. Processes are not supposed to work this way - let dead processes wander around instead of simply letting them die and enter the digital paradise, so the presence of zombies shows that the processes that leave them here have some flaws.

An easy way to check your system for zombie processes left over is to look at  top the command's header line.

 
  
  1. $ top

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

  3. Tasks: 171 total, 1 running, 167 sleeping, 0 stopped, 3 zombie  `< ==`

  4. %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

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

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

horrible! The above shows three zombie processes.

at midnight

It is sometimes said on Halloween, when the spirits of the dead wander from sunset until midnight. Linux can  at midnight track their departure via commands. Used to schedule a job to run the next time the specified time arrives, at acts like a one-time cron.

 
  
  1. $ at midnight

  2. warning: commands will be executed using /bin/sh

  3. at> echo 'the spirits of the dead have left'

  4. at> <EOT>

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

daemon

Linux systems are also highly dependent on daemons - processes that run in the background and provide many of the system's functions. Many daemons have names ending in "d". The "d" stands for daemon, indicating that this process is always running and supports some important functions. Some will use the word "daemon".

 
  
  1. $ ps -ef | grep sshd

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

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

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

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

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

Happy Halloween!

on  Facebook[1] and  LinkedIn[2] Join the Network World community on to comment on topics.


via: https://www.networkworld.com/article/3235219/linux/scary-linux-commands-for-halloween.html

Author: Sandra Henry-Stocker[4] Translator: geekpi  Proofreading: wxy

 This article is originally compiled by  LCTT , and launched by Linux China  with honor


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324516407&siteId=291194637