Cheat Sheet

Advanced Linux Commands Cheat Sheet

There is a lot to know about Linux. If you know the basic commands of Linux then this cheat sheet can help you take your skills to the next level.

In this cheat sheet, author Maxim Burgerhout, uses the development of a LAMP application as an example and provides commands to:

  • Get started developing a web application on Red Hat Enterprise Linux 7
  • Set up a SELinux boolean
  • Run a program in the background in your shell
  • Use Java instead of PHP

Try it out on Red Hat Enterprise Linux 7 here.

Cheat Sheet Excerpt

As an example scenario, we are going to pretend we are developing a LAMP (Linux, Apache, MariaDB and PHP) application on single machine running Red Hat Enterprise Linux 7. As a first step, we’re going to install Apache, PHP and MariaDB (the drop-in replacement for MySQL that’s shipped with Red Hat Enterprise Linux 7), and start the appropriate services:

# yum -y install httpd mariadb-server php-mysql php
Installs the correct packages to start developing a LAMP application: the Apache webserver, the base packages for PHP, and a MariaDB server, including MySQL bindings for PHP.
$ systemctl status httpd
Show information about httpd, including process ID, child processes, time since startup, what man pages are available, the most recent log messages, and more.
# systemctl start httpd mariadb
Start the httpd and mariadb services. Instead of ‘start’, you can also use stop or restart, for obvious use cases
# systemctl enable httpd mariadb
Enable the httpd and mariadb services to start at next boot. You can also use disable, mask or unmask.
Want to see more? Get the full cheat sheet.
×