Linux evidence cheat sheet
Where the evidence is on Linux servers and desktops, grouped by the question you are trying to answer. Paths are for Debian and Ubuntu, with Fedora and RHEL where they differ. Free, no sign-up, and it prints on a few pages. ~ is the user's home folder.
Before you collect
On a live system, collect what disappears first, then image the disk.
| What | Where | Note |
| Processes and connections | ps auxf, ss -tupan, lsof -nP | Lost at shutdown. |
| Programs whose file was deleted | ls -l /proc/*/exe 2>/dev/null | grep deleted | A running program with its file removed is a classic sign of an intruder. Copy it from /proc/<pid>/exe. |
| Memory | LiME or AVML | Capture RAM before shutting down, if you need it. |
| Logs kept only in memory | /run/log/journal/ | If the journal is not persistent, it is gone after a reboot. |
About the system
| What | Where | Note |
| Distribution and version | /etc/os-release | |
| Host name | /etc/hostname, /etc/hosts | |
| Time zone | /etc/localtime, /etc/timezone; timedatectl | Write it down first. The journal stores UTC; text logs often use local time. |
| Install date | /var/log/installer/ (Debian, Ubuntu), /root/anaconda-ks.cfg (Fedora, RHEL) | |
| Networks | /etc/NetworkManager/system-connections/, /etc/netplan/, /etc/network/interfaces | Wi-Fi names and settings; files can hold Wi-Fi passwords. |
| Addresses handed out | /var/lib/NetworkManager/*.lease, /var/lib/dhcp/ | DHCP leases with times. |
| Disks and mounts | /etc/fstab, lsblk -f | |
Who logged on, and how?
| What | Where | Note |
| Accounts | /etc/passwd, /etc/shadow, /etc/group | Any account with UID 0 besides root is a red flag. In shadow, field 3 is the last password change (days since 1970). |
| Who may be root | /etc/sudoers, /etc/sudoers.d/; the sudo or wheel group | |
| Login history | /var/log/wtmp (last -f), /var/log/btmp (lastb, failed) | Newer systems may use /var/lib/wtmpdb/wtmp.db (wtmpdb last). |
| Last login per user | /var/log/lastlog (lastlog) | Newer systems: /var/lib/lastlog/lastlog2.db (lastlog2). |
| Logged in now | /var/run/utmp (who, w) | |
| Authentication log | /var/log/auth.log (Debian, Ubuntu), /var/log/secure (Fedora, RHEL) | SSH logins, sudo, su, failed passwords. Many new installs keep these only in the journal. |
| From the journal | journalctl _COMM=sshd, journalctl _COMM=sudo | The same events where there is no auth.log. |
| SSH keys | ~/.ssh/authorized_keys, ~/.ssh/known_hosts, /etc/ssh/sshd_config | Keys that may log in; machines this user connected to (often hashed). |
What commands and programs were run?
| Artifact | Where | What it tells you |
| Shell history | ~/.bash_history, ~/.zsh_history, ~/.local/share/fish/fish_history, /root/.bash_history | Written when the shell exits, and easy to turn off: a missing or empty file is itself evidence. |
| Other histories | ~/.viminfo, ~/.lesshst, ~/.python_history, ~/.mysql_history | Files edited, searched and queried. |
| Audit log | /var/log/audit/audit.log (ausearch, aureport) | Only if auditd is running; then very detailed. |
| Process accounting | /var/log/account/pacct (Debian), /var/account/pacct (RHEL); lastcomm | Only if turned on. |
| Packages installed | /var/log/dpkg.log, /var/log/apt/history.log; /var/log/dnf.log, dnf history; /var/log/pacman.log | What was installed or removed, when, and by which command. |
| Changed system files | dpkg --verify, rpm -Va | Files that differ from what the package installed. |
| Snap and Flatpak | snap changes, flatpak history | |
What starts by itself? (persistence)
| Artifact | Where | Note |
| cron | /etc/crontab, /etc/cron.d/, /etc/cron.{hourly,daily,weekly,monthly}/, /var/spool/cron/crontabs/ (Debian), /var/spool/cron/ (RHEL) | User crontabs are in the spool folder. |
| at jobs | /var/spool/cron/atjobs/ (Debian), /var/spool/at/ (RHEL) | |
| systemd services and timers | /etc/systemd/system/, ~/.config/systemd/user/; systemctl list-timers --all | Units from packages are in /usr/lib/systemd/system/; new ones in /etc deserve a look. |
| Shell start-up | ~/.bashrc, ~/.profile, ~/.bash_profile, /etc/profile, /etc/profile.d/, /etc/bash.bashrc | |
| Older start-up | /etc/rc.local, /etc/init.d/ | |
| Desktop autostart | ~/.config/autostart/, /etc/xdg/autostart/ | |
| Library preloading | /etc/ld.so.preload | Usually missing or empty. Anything here is a rootkit sign. |
| Kernel modules | /etc/modules, /etc/modules-load.d/; lsmod | |
| Login rules | /etc/pam.d/ | A changed PAM file can let anyone in. |
| Device rules | /etc/udev/rules.d/ | Can run a program when a device is plugged in. |
Which USB devices were connected?
| Artifact | Where | What it tells you |
| Kernel messages | journalctl -k, /var/log/kern.log, /var/log/syslog, /var/log/messages | "New USB device found" with idVendor, idProduct and SerialNumber, and the disk name it got. |
| Mounted | journalctl -u udisks2; folders under /media/<user>/, /run/media/<user>/ | Volume names and when they were mounted. |
| Right now | lsusb, /sys/bus/usb/devices/ | Only devices connected at the moment. |
Which files were opened, and what was deleted?
| Artifact | Where | What it tells you |
| Recent files (GNOME and others) | ~/.local/share/recently-used.xbel | Files opened, by which app, with times. |
| Recent files (KDE) | ~/.local/share/RecentDocuments/ | |
| Thumbnails | ~/.cache/thumbnails/ | Each PNG stores the original file's path and time, even after the file is deleted. |
| Trash | ~/.local/share/Trash/files/, ~/.local/share/Trash/info/*.trashinfo | The .trashinfo file gives the original path and deletion date. |
| Staging places | /tmp, /var/tmp, /dev/shm | Where intruders often drop tools; /dev/shm lives in memory. |
| Backups of key files | /var/backups/ (Debian), editor swap files (.*.swp) | Older copies of passwd, shadow and group; text being edited. |
| Snapshots | Btrfs (btrfs subvolume list /), LVM (lvs), ZFS, Timeshift | Older copies of whole file systems. |
| A word on deletion | | On ext4 and SSDs with TRIM, deleted file contents are hard to recover. Look for copies instead. |
What was browsed or downloaded?
| Browser | Where | Note |
| Firefox | ~/.mozilla/firefox/<profile>/places.sqlite | Snap: ~/snap/firefox/common/.mozilla/firefox/. |
| Chrome | ~/.config/google-chrome/<profile>/History | Profile is Default or Profile 1, 2... |
| Chromium | ~/.config/chromium/<profile>/History | Snap: ~/snap/chromium/common/chromium/. |
| Brave | ~/.config/BraveSoftware/Brave-Browser/<profile>/History | |
| Flatpak apps | ~/.var/app/<app id>/ | Each Flatpak browser keeps its profile here. |
Logs worth knowing
| What | Where | Note |
| systemd journal | /var/log/journal/ (kept), /run/log/journal/ (lost on reboot) | Read a copied journal with journalctl -D <folder>. |
| System log | /var/log/syslog (Debian, Ubuntu), /var/log/messages (Fedora, RHEL) | Debian 12 and later have no syslog file unless rsyslog is installed. |
| Boots and shutdowns | journalctl --list-boots, last -x | |
| Web servers | /var/log/apache2/, /var/log/httpd/, /var/log/nginx/ | Access logs show every request: look for odd paths and uploads. |
| Containers | /var/lib/docker/, /var/lib/containers/, ~/.local/share/containers/ | Images, containers and their logs (Docker, Podman). |
| Tampering | journalctl --verify | Gaps in time, empty files and a failed verify mean logs may have been cleared. |
Memory on disk
| What | Where | Note |
| Swap | swap partition or /swapfile (see /proc/swaps) | Pieces of memory: strings, commands, keys. |
| Hibernation | the swap space named in the kernel resume= option | Only if the machine hibernated. |
| Core dumps | /var/lib/systemd/coredump/; coredumpctl list | Programs that crashed, with their memory. |
Paths differ between distributions, versions and settings, and many logs are off or short-lived by default. Always confirm an artifact on a test system before relying on it. This sheet is a reference, not legal advice. © Cyfirx.