Start / Stop / Restart Postfix Mail Server

To start, stop, or restart the Postfix mail server on a Linux system, you can use the systemctl command if your system uses systemd as the init system. Here are the commands you can use: To start Postfix, run the following command: systemctl start postfix To stop Postfix, run the following command: systemctl stop postfix … Read more

Reverse nslookup Command

The nslookup command is used to perform forward DNS lookups, meaning it resolves hostnames to IP addresses. To perform a reverse DNS lookup, which resolves IP addresses to hostnames, you can use the host command instead. The host command can perform both forward and reverse DNS lookups. To perform a reverse DNS lookup, simply provide … Read more

See Filesystems In Linux

To see the file systems in Linux, you can use the df (disk free) command. The df command displays information about the file system disk space usage. By default, df displays the file system disk space usage in blocks, with the sizes rounded to the nearest 1K block. To display the disk space usage in … Read more

Ubuntu Linux Renew DHCP

To renew DHCP lease on Ubuntu Linux, you can use the following steps: Open a terminal window. Run the following command to release the current DHCP lease: sudo dhclient -r Run the following command to renew the DHCP lease: sudo dhclient If the renewal is successful, you should see output similar to the following: Listening … Read more

Bash: Display Current Date

To display the current date in Bash, you can use the date command. Simply run the following command in a Bash terminal: date This will display the current date and time in the default format, which is determined by the system’s locale settings. If you want to display the date in a specific format, you … Read more

How To Turn off SELinux using command line

To turn off SELinux using the command line, you can use the following steps: Log in to the system as the root user. Edit the /etc/selinux/config file using a text editor such as vi or nano: vi /etc/selinux/config Change the SELINUX parameter to disabled: SELINUX=disabled Save and close the file. Reboot the system to apply … Read more

MySQL Import File / Database Command

To import a MySQL database from a file, you can use the mysql command-line client. Assuming that you have a MySQL dump file (which is a text file containing SQL statements that recreate the database), you can use the following command to import the file: mysql -u username -p database_name < file.sql Replace username with … Read more

Ubuntu Linux Find JDK Version

To find the version of the Java Development Kit (JDK) installed on Ubuntu Linux, you can use the following command in a terminal: java -version This will output information about the Java Runtime Environment (JRE) installed on your system, including the version number. If you have the JDK installed, the version number will be included … Read more