↑ ↓ select, Enter open, Esc close

#configuration

21 one-liners with this tag.

All one-liners tagged configuration

Change service settings with an override

#systemctl edit mariadb
cautionsystemd

Check the Apache configuration for syntax errors

#apache2ctl configtest
harmlessApache

Check the current value of a PHP setting

$php -i | grep -i memory_limit
harmlessPHP

Check the nginx configuration for syntax errors

#nginx -t
harmlessnginx

Find modified package configuration files

#debsums -ce
harmlessDebian and APT

List all configuration files Apache loads

#apache2ctl -t -D DUMP_INCLUDES
harmlessApache

List loaded Apache modules

#apache2ctl -M
harmlessApache

Permanently limit the size of the systemd journal

#mkdir -p /etc/systemd/journald.conf.d && printf '[Journal]\nSystemMaxUse=500M\n' > /etc/systemd/journald.conf.d/size.conf && systemctl restart systemd-journald
cautionsystemd

Replace text in a file with sed and keep a backup

$sed -i.bak 's|memory_limit = 128M|memory_limit = 256M|g' php.ini
cautionText processing

Show a config file without comments and blank lines

$grep -Ev '^\s*(#|;|$)' /etc/php/8.2/fpm/php.ini
harmlessText processing

Show a service's unit file including overrides

$systemctl cat mariadb
harmlesssystemd

Show all Apache virtual hosts and their config files

#apache2ctl -S
harmlessApache

Show all nginx server_name entries with their config file

#nginx -T 2>/dev/null | grep -E "^# configuration file|server_name "
harmlessnginx

Show custom Plesk settings in panel.ini

#cat /usr/local/psa/admin/conf/panel.ini
harmlessPlesk

Show the additional nginx directives of a Plesk domain

#cat /var/www/vhosts/system/example.com/conf/vhost_nginx.conf
harmlessnginx

Show the effective sshd settings

#sshd -T | grep -Ei '^(port|permitrootlogin|passwordauthentication|pubkeyauthentication|kbdinteractiveauthentication|allowusers|maxauthtries) '
harmlessSSH

Show the environment variables of a Docker container

#docker exec app env
harmlessDocker

Show the loaded php.ini files

$php --ini
harmlessPHP

Show the nginx configuration Plesk generated for a domain

#cat /var/www/vhosts/system/example.com/conf/nginx.conf
harmlessnginx

Test a logrotate configuration without rotating

#logrotate -d /etc/logrotate.d/nginx
harmlessLogs

Test the sshd config and reload the SSH service

#sshd -t && systemctl reload ssh
cautionSSH

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.