Ubuntu Unleashed 2019 Edition: Covering 18.04, 18.10, 19.04

(singke) #1

“Managing Software”), and you can specify connection settings as
appropriate, or if you have access to a predefined configuration file (PCF),
you can import it directly into Network Manager.


Troubleshooting Post-Installation


Configuration Problems


A lot of work has gone into making Ubuntu as versatile as possible, but
sometimes you might come across a piece of hardware that Ubuntu is not sure
about. Knowing what to do in these situations is important, especially when
you are new to working with Ubuntu.


Because Ubuntu (and Linux in general) is built on a resilient UNIX
foundation, it is much more stable than some other operating systems.
However, even though things might seem to be working fine, Ubuntu could
have a problem that might not affect the appearance of the system. In this
section, you learn how to examine some of Ubuntu’s built-in error logs, which
can help you discover or diagnose unseen problems.


Ubuntu has a command that responds with detailed messages that are output
directly by the operating system: the dmesg command, which we introduce
here and cover more completely in Chapter 12, “Command-Line Master
Class, Part 2.” This command is commonly used with the grep command to
filter output. The dmesg command takes its output directly from the
/var/log/messages file, so you can choose to either run dmesg or read
the file directly by typing less /var/log/messages. The output is
fairly detailed, so be prepared for an initial shock when you see how much
information is generated. You might find it easier to generate a file with the
dmesg output by using the following command:


Click here to view code image
matthew@seymour:~$ dmesg > dmesg.txt


This takes the output from the dmesg command and stores it in a new text
file called dmesg.txt. You can then browse it at your leisure, using your
choice of text editor, such as vi or emacs. You can even use the less
command, like so:


Click here to view code image
matthew@seymour:~$ less dmesg.txt


The messages are generated by the kernel, by other software run by
/etc/init.d, and by Ubuntu’s runlevel scripts. You might find what

Free download pdf