Categories
Uncategorized

How to access sensor data

Install lm-sensors package: $ sudo apt-get install lm-sensors Execute sensors-detect command as root: $ sudo sensors-detect It will determine needed modules and at the end it will ask for your permission to automatically add them to the /etc/modprobe file. If you answered yes then load them using command: $ sudo service module-init-tools start Now you […]

Categories
Uncategorized

How to determine current run-level using Linux

To print current run-level execute: $ who -r run-level 3 2012-01-17 17:06 To print previous and current run-level execute: $ sudo runlevel N 3

Categories
Uncategorized

OSF Data Loss

Check out OSF Data Loss a research project aimed at documenting known and reported data loss incidents world-wide.

Categories
SecOps SysOps

How to check established TCP connections

Display established TCP connections inside the terminal.

Categories
Uncategorized

How to force sudo to forget password

When you want to leave terminal open but force sudo to forget password then enter command: $ sudo -K

Categories
Uncategorized

How to use sudo from within Vim to save file

It is very annoying to see message “E212: Can’t open file for writing” when trying to save file. Hopefully there is a simple solution (a bit longer but without “W12 Warning“): :execute ‘:w !sudo tee % > /dev/null’ | :edit! Look at commandlinefu.com for more solutions like :W command below: :command W :execute ‘:silent w […]

Categories
Uncategorized

Secure personal data management

I tend to forget passwords from time to time so I installed KeePassX today. Now I can store them in one place, organize and perform auto type.

Categories
Uncategorized

CentOS 6.2, phpMyAdmin, Apache 2.2 – Segmentation fault (11)

Today I installed phpMyAdmin on fresh CentOS 6.2 (with EPEL repository) and it was not working. Looking at Apache logs revealed only notice: [notice] child pid 41292 exit signal Segmentation fault (11) My Apache and PHP versions: $ httpd -v Server version: Apache/2.2.15 (Unix) Server built: Dec 8 2011 18:07:26 $ php -v PHP 5.3.3 […]