The following article provides an introduction to basic troubleshooting commands within Ubuntu Linux.
The following article deals with basic troubleshooting commands in terminal on an Ubuntu operating system.
If you were looking for a tutorial on general terminal commands, check out the article below:
If you were after a list of the most common commands, check out the reference below:
The following lists provides basic text commands within Ubuntu Linux and provides examples of how they can be used to help troubleshoot specific issues with your computer.
Use the command uname to show what kernel is being used. The kernel is the first section of the operating system to load into memory, and controls such system areas as disk drive management, memory allocation, system processes, and interrupt handler. In the example below, the kernel being used is 3.11.0-15-generic:
Use the command dmesg to show the contents of the boot log. This is a good way to find errors at startup:
In the example below, the command cat can be used with dmesg to join together the contents of the log file. The additional command grep can be used to show any instance of a particular file name occurring in the log, for example either Intel or error:
The command lspci lists all devices found on the PCI bus:
Using the lspci command with the additional commands of cat and grep will help to isolate specific PCI devices, as in the case of Realtek below:
Use the command lsmod to list all the loaded mod files within the kernel:
In Linux, the driver files are loaded as mods. To see which driver/mods are loaded in the kernel, you can use the cat and grep command with lsmod to search for specific mod files, as in the two examples with Dell and hda below:
Use the command lsusb to list all the USB devices connected to the USB bus:
You can use this command with the additional cat and grep commands to isolate specific USB devices, as in the case of Intel below:
Use the ifconfig command to set and query your computer's network settings:
You can use this command with the additional cat and grep commands to search for inet, which will list your computer's IP addresses:
The following table lists some of the more basic commands used within Linux for troubleshooting purposes, as well as giving the function and syntax for each:
|sudo||Used before a command to run as root, or administrator.||sudo apt-get update|
|ls||Same as "dir"; lists the current directory.||ls-ll|
|cp||Copy file.||cp /dir/filename /dir/filename|
|rm||Delete file.||rm /dir/filename /dir/filename|
|mv||Move file.||mv /dir/filename /dir/filename|
|mkdir||Make a directory.||mkdir /dirname|
|df||Report file system disk space usage.||df -h|
|dmesg||Print or control the kernel ring buffer.||dmesg|
|lspci||Lists all PCI devices.||lspci|
|lsusb||Lists all USB devices.||lsusb|
|lsmod||Shows the status of modules in the Linux kernel.||lsmod|
|cat||Concatenate files and print on the standard output.||cat /dir/logfile|
|grep||Print lines of input matching a specified pattern.||grep intel|
|apt-get||Update installer.||apt-get update, or apt-get upgrade|
|sosreport||A utility that collects configuration and diagnostic information about your system. The utility needs to be installed first using the following command line: "sudo apt-get install sosreport". It is recommended you reboot your system after the install before first running the utility.||sosreport|
|"cat" and "grep" together||Use to list all the instances of a specific search item.||cat /dir/logfile | grep intel (the output of this command would print to the default output source any instance of the string "intel")|
For additional help troubleshooting Linux on your Dell computer, you can search the Knowledge Library at Dell's Support Website.
Article ID: SLN289410
Last Date Modified: 11/30/2016 08:07 AM
Thank you for your feedback.