

For example: ‘ post_max_size‘ in the ‘php.ini’ file.

To find a particular part of a config file to edit, you can press Ctrl + W and then type in a portion of what you’re searching for and press enter. You simply type the following and it opens the file for editing: nano nfĪfter that, you can just use the arrow keys to navigate your way through the file and make the necessary changes. However, the fact that it is a command line text editor makes it terribly convenient for editing configuration files on servers that have no GUI, or if you are editing them remotely via SSH. This is useful because you can leave it running and monitor the current status of the respective program’s log file to see errors manifest themselves in real time/as they occur.Īn example of the ‘tail’ command’s usage is: tail -f /var/log/apache2/error.log Tail: You can view the tail end of log files in RedHat using the ‘ tail‘ command. The examples above view the dnf (package management utility) and the operating system’s boot logs respectively. You may need to prefix the command with ‘ sudo‘ if you are a non-root user.

The ‘less’ command accepts the log filename as a parameter and then you can scroll through it using the ‘ page down‘ key. Less: If you need to view the contents of a log file at the command line in RedHat, you can use the ‘ less‘ command. Viewing RedHat Logs And Editing/Displaying Configuration Files Install or remove Software via the Command Line. In that case, you may need to prefix ‘sudo’ before your command. I include short examples of the Linux commands and may include a brief comment here and there to clarify them.īefore continuing, if you get a ‘ permission denied‘ error, it is because you don’t have permission to do something. I tested the following commands on RedHat Enterprise Linux 8.0. I cannot guarantee that the commands in this article will work in all versions of RedHat.Īlso bear in mind that the structure of commands can change over time. If you’re just getting started with RedHat Enterprise Linux, then these commands can help you to get up to speed sooner!

RedHat offers numerous commands that can be used across many Linux distributions and they can make life easier for you as a system adminsitrator, or a home PC user.
