Linux

Force fsck at reboot

There are at least two ways to force a disk check (fsck) at reboot. Creating a /forcefsck file As root run the following command # touch /forcefsck Using the shutdown command # shutdown -rF now Note This command switch might not work on modern Linux operating systems since they use Upstart instead of the old […]

Read More
Linux

HP Compaq 8540p hardware list in linux

You can use lspci -n to analyce what hardware is on your system. My new laptop a HP EliteBook 8540p gives the following output: 00:00.0 0600: 8086:0044 (rev 12) 00:01.0 0604: 8086:0045 (rev 12) 00:16.0 0780: 8086:3b64 (rev 06) 00:19.0 0200: 8086:10ea (rev 06) 00:1a.0 0c03: 8086:3b3c (rev 06) 00:1b.0 0403: 8086:3b56 (rev 06) 00:1c.0 […]

Read More
Linux

Indent/format an entire file using vim

You can format/indent an entire file using the vim editor and the gg=G command. gg – Goto the beginning of the file = – apply indentation G – till end of file If you decide not to indent your file, just press u to undo the last operation.

Read More
Linux

Universally Unique Identifier UUID

This is the command to print the UUID for a device. This may be used with UUID= in /etc/fstab as a more robust way to name devices that works even if disks are added and removed. Ubuntu 10.04 uses this in their /etc/fstab file. Example 1 Print UUID to partition /dev/sda1 # blkid -o value […]

Read More
Linux

Howto remove orphan packages in Ubuntu

There is usually some orphan packages left on the system after upgrading Ubuntu from one major version to another. These packages can cause strange errors like Ubuntu bug #151045. The solution to this problem is a package named deborphan. deborphan removes orphan packages that are left on your Ubuntu installation and you should run this […]

Read More