When we work with the nice command, it’s clear that it can’t change the scheduling priority of running processes. As we’ve just seen, we would need to stop and then start the process in this case. This is where the renice command shines. We can leverage the renice command to change the niceness while the […]
Archives for March 2022
restorecon Command Examples in Linux
Using restorecon is easy. Just type restorecon, followed by the name of the file that you need to change. Once again, I’ve changed the context of the index.html file back to the home directory type. This time, though, I’m using restorecon to set the correct type: $ ls -Z -rw-rw-r–. web web unconfined_u:object_r:user_home_t:s0 index.html $ […]
runlevel Command Examples in Linux
The output of the runlevel command will indicate your previous and current runlevel separated by a single space. If there was no previous runlevel ‘N’ will be used as a placeholder. For example: # runlevel N 5 The output above indicates that the current runlevel is 5 and there was no previous runlevel. Below is […]
sa Command Examples in Linux
Process accounting allows you to keep detailed logs of every command a user runs, including CPU time and memory used. From a security standpoint, this means the system administrator can gather information about what user ran which command and at what time. This is not only very useful in assessing a break-in or local root […]
scsi_id Command Examples in Linux
scsi_id is the command used for finding out the WWN numbers for the external LUNS attached to the host via a FC cable and can’t be used for finding out UUID of devices. scsi_id is primarily for use by other utilities such as udev that require a unique SCSI identifier. By default all devices are […]
sestatus Command Examples in Linux
SELinux can either be in an enabled or a disabled state. In order to check in which state it is running, we can make use of the getenforce command. There are two modes in which SELinux runs: There are two modes in which SELinux runs: Enforcing: This is the enabled state where all rules are […]
setenforce Command Examples in Linux
We can change the SELinux modes from enforcing to permissive and vice versa during runtime by using the setenforce command. Before and after changing the SELinux mode, we must ensure the current mode by using the getenforce command. SELinux can either be in an enabled or a disabled state. In order to check in which […]
sftp Command Examples in Linux
SFTP is a file transfer system that runs on top of an SSH connection and emulates an FTP interface. It requires an SSH server on the remote system instead of an FTP server. It provides an interactive session with an sftp prompt. Sftp supports the same commands as ftp and lftp. To start an sftp […]
Sample /etc/kdump.conf configuration file
An image of system memory captured after a kernel crash or hang is called a crash dump. Analyzing a crash dump can give valuable clues for postmortem analyses of kernel problems. However, obtaining a dump after a kernel crash is inherently unreliable because the storage driver responsible for logging data onto the dump device might […]
ufw Command Options
The Uncomplicated Firewall (UFW) is a firewall management tool that makes it easier to configure the iptables service. UFW originated with Ubuntu® but can be downloaded and installed on other distributions. It is primarily useful for home users who don’t have experience with the intricacies of firewall configuration. The ufw command enables you to work […]