Useful linux troubleshooting commands

by Ras 28. March 2012 02:34

 

Below commands are very useful for troubleshooting and finding information about a linux system

 

lsdev        This command will list all the devices
lspci         This command will list all of the PCI devices
lsusb        This command will list all USB devices
lsmod       This command will list all Modules
lsof          This command will list all of the Open Files

 

cat /etc/ld.so.conf    This will show all loaded libraries

ldconfig        If you change /etc/ld.so.conf use this to load it after change

sysctl            changes settings on /proc/sys/  directories and files

/etc/logins.def          Some useful default values for various programs such as useradd and password expiry
/etc/profile               Set the shell variables PATH, USER, MAIL, HOSTNAME and HISTSIZE (system-wide environment variables)
/etc/bash.bashrc       Similar to /etc/profile but you have to invoke it manually by running bash
cat /etc/sysctl.conf    Various Linux networking and system settings
sysctl -p /etc/sysctl2.conf      Load sysctl settings from a file
sysctl -w kernel.domainname="blah.com"     Change one setting in sysctl

 

Tags:

Linux

About the author

Ras is a network/Security professional working on multiple areas with multiple certificates like CCNP, CCIP, CCSP, CCSA, CCSE, LPI, PM, IPv6, ..

Month List