Oneliners every sysadmin should know

Wed 24 December 2014
By alex

Apache

Dump virtualhosts

apachectl -S

Dump enabled modules

apachectl -M

Show version and current MPM (and compile options)

apachectl -V

Test config file

apachectl -t

PHP

Test config file

php -t

Show phpinfo()

php -i

Dump configured modules

php -m

Show loaded ini files

php --ini

Mysql

Test config file

mysqld --help

Dump msyql settings

mysql -e 'show variables;'

Commands

Remove commented lines

grep -v '#' blah.conf | egrep -v '^$'

Tarball download and unzip

wget -qO- url.tar.gz | tar -xzf -

Nginx

Show compile time options

nginx -V 2>&1 | tr ' ' '\n'