Howtos / Articles

List all hard disks connected to a Ubuntu system

You often need to know what physical drives are attached to a system, how many drives are connected, or even what device names match up with which physical drive. Ubuntu comes with a handy tool called ‘lshw’ which is used to extract detailed information on the hardware in the PC. To view a listing of all disks in the system: $ sudo lshw -class disk -short This will list all disks and storage devices. This includes DVD drives, USB card…

Read more [...]

Save iptables firewall config on CentOS 6

Changes you make to iptables firewall rules only exist for the current boot, and if you don’t save the config, you will loose any changes upon rebooting. CentOS 6 blocks most incoming ports by default, so you will generally have to make changes to the firewall if you install any new packages. Thankfully CentOS 6 provides the ability to easily save the configuration. To save the current iptables firewall config, issue the following command: # service iptables save Example output:…

Read more [...]

Find what Linux distribution you are using

There are many Linux distributions out there, all with their slight differences. It’s sometimes its hard to determine what distribution you are current using, assuming you weren’t the one who installed it. The commands below can be used to determine the Linux distribution you are using, and in most cases, what version. Generic check: cat /etc/ or cat /etc/issue Sample output: # cat /etc/ CentOS release 6.3 (Final) Kernel \r on an \m # This shows that the distribution is…

Read more [...]

Find what Linux kernel version you are running

To determine what version of the Linux kernel you are currently using, you can use the uname command as per the examples below. $ uname -a This will output the host name of the computer, Kernel version, and the CPU architecture. Example output: $ uname -a Linux localhost.localdomain 2.6.32-279.19.1.el6.x86_64 #1 SMP Wed Dec 19 07:05:20 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux $ localhost.localdomain being the host name of the computer 2.6.32 being the kernel version (the rest relates specifically to…

Read more [...]

Live Monitoring of Log Files on Linux

The tail command which is found on almost all Linux distributions is used to output the last part of files. There is a parameter for the tail command that allows you to monitor a file, and continually output new lines from the file as they are added. This is especially handy for monitoring log files that are constantly being updated. The commands below can be used to continuously monitor log files. Monitor a log file using tail: $ tail -f…

Read more [...]

Page 10 of 38« First...6789101112131415...30...Last »