Chapter 6
Reading and editing text
Updated November 1, 2026
To see a whole file, there is cat:
$ cat /etc/hostnameFor a large file cat is awkward: it dumps everything at once and the start scrolls away. Then you use less. The package manager log works well for a first try: it exists on every machine where packages were installed, and it holds thousands of lines.
$ less /var/log/dpkg.log # Ubuntu, Debian
$ less /var/log/dnf5.log # Fedora 41 and newer, RHEL 10The log name depends on the package manager generation: dnf5 (Fedora 41 and newer, RHEL 10) writes to /var/log/dnf5.log, while the older dnf (RHEL 8 and 9, Fedora before 41) writes to /var/log/dnf.log. If you have neither, look at ls
Locked
The rest of this chapter is part of a paid course
You are reading the open part. Buy the course to read the whole chapter.