How to Set Up Keylogging on Your Linux Computer

Keylogging has a bad reputation among computer users, and there are daily warnings to watch out for keylogger-related malware in extensions, dodgy apps, and even on web pages. But what if you actually want a keylogger installed on your Linux computer? Here’s how to do it.

Why Would You Want to Install a Keylogger on Linux?

Keyloggers are very dangerous and powerful tools. They give you a complete picture of every input a keyboard has received, including deleted characters, numbers, spaces, and backspaces. Naturally, keyloggers are very attractive to individuals of the villainous persuasion, who may use them to filch usernames, passwords, and other private details from another person’s PC.

But there are legitimate reasons why you may want to install a keylogger on your own Linux computer.

  • A keylogger helps you to monitor physical login attempts on your machine
  • You can use a keylogger to detect words you frequently misspell
  • You can count up the total words or characters typed over any period across multiple apps
  • You can use a keylogger in combination with other tools to help you remember your usernames and passwords
  • You can monitor what children are typing on a shared family computer
  • Remember, by installing a keylogger on a shared machine, you’re giving yourself a great deal of power over other people who use the machine. Don’t misuse it by monitoring other adults without their permission.

    How to Install and Use Simple Keylogger on Linux

    Simple Keylogger is an open-source command-line program that requires Python to run. Check if you have Python installed by opening a terminal, and entering:


    If you receive a “command not found” message, you should install Python now.

    Clone the Simple Keylogger repo:

    git clone https:

    …and change the directory using the cd command:

    cd Keylogger/linux/

    Now use Python to install the program:

    pip3 install -r requirements.txt

    Keylogger is now installed, and you can run it by inputting:

    nohup python3

    …into your terminal.

    Log files are saved under the name “nohup.out” in the directory where you initialized Simple Keylogger.

    You can read the contents with:

    cat nohup.out

    You need to start Simple Keylogger manually, so if you want the program running as soon as your system starts, you should add it as a cronjob.

    To stop Simple Keylogger from logging, type fg into any terminal, followed by Ctrl + C. Alternatively, you can kill the process.

    System Surveillance Is a Two-Edged Sword

    You’ve seen how easy it is for you to install a keylogger on your Linux system, and it has probably set alarm bells ringing that perhaps you don’t want every keystroke you make saved to a file. A keylogger exposes all your mistakes, as well as your passwords and every sensitive search term you type into an incognito browser window.

    A text file containing that information would be very valuable to criminals and other interested parties. If you don’t want to delete your Simple Keylogger log files, you should at least encrypt them.

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    Back to top button

    Adblock Detected

    Please consider supporting us by disabling your ad blocker