Karim Buzdar – Linux Hint https://linuxhint.com Exploring and Master Linux Ecosystem Wed, 10 Mar 2021 03:28:04 +0000 en-US hourly 1 https://wordpress.org/?v=5.6.2 How to Fix “failed to start hostname.service unit hostname.service is masked” Error https://linuxhint.com/fix-failed-to-start-hostname-service-error/ Tue, 09 Mar 2021 05:23:33 +0000 https://linuxhint.com/?p=93550 Whenever you bring in a new computer system, there is a default hostname associated with it that is mapped onto a specific IP address. However, you can always change this hostname for your convenience. Once you change the hostname of your Linux-based system, you should always restart the “hostname.service” module for the new changes to take effect. Sometimes, when restarting this service, you may encounter the “failed to start hostname.service unit hostname.service is masked” error. This article highlights the root cause of this error and shows you how to resolve this error.

Causes of the Error

The system hostname is stored in two main files in Linux. The first file is the “/etc/hostname” file, and the other file is the “/etc/hosts” file. The former only consists of the hostname of your system, whereas the latter contains a mapping of the hostname onto a specific IP address. The “failed to start hostname.service unit hostname.service is masked” error arises when the contents of these two files are mismatched, i.e., the hostname mentioned in one of these files is different from the hostname in the other file. Due to this inconsistency between the contents of the “/etc/hostname” and “/etc/hosts” files, your system will fail to start the hostname.service, and the error will occur.

How to Resolve the Error

The simplest way to resolve this error in Linux is by ensuring that the hostname mentioned in both files is the same. To do so, you will need to check the contents of both these files. You can access the “/etc/hostname” file by executing the following command in the Linux terminal:

$ sudo nano /etc/hostname

Our “/etc/hostname” file is shown in the image below:

The “/etc/hosts” file can be accessed with the following command:

$ sudo nano /etc/hosts

Our “/etc/hosts” file is shown in the image below:

As you can see from the contents of both files, our hostname is the same in both files, i.e., kbuzdar-VirtualBox. Once you have ensured that the hostname in your respective files is exactly the same, then you can try restarting the hostname.service once again. This time, it should not render the error.

Conclusion

This article enlightened you about the causes of the “failed to start hostname.service unit hostname.service is masked” error. Moreover, it also shared with you the simplest method through which you can get rid of this error in Linux.

]]>
How do I Access a Remote Desktop from Debian 10? https://linuxhint.com/access-remote-desktop-debian-10/ Tue, 09 Mar 2021 02:17:35 +0000 https://linuxhint.com/?p=93097 By accessing a remote desktop, we essentially mean that we want to access the desktop environment that is running on another computer system from our computer system. This strategy is generally used to provide technical support to customers by remotely accessing their computer systems. There can be several other use cases of adopting this strategy. In today’s article, we will learn how to access a remote desktop from a Debian 10 system.

Method of Accessing a Remote Desktop from Debian 10:

For accessing a remote desktop from your Debian 10 system, you will have to perform the following steps:

Step # 1: Update your Debian 10 System:

First, we have to update our Debian 10 system with the command shown below:

$ sudo apt-get update

When our Debian 10 system is fully updated, we will install a remote desktop client of our choice on it.

Step # 2: Install Remmina Remote Desktop Client on your Debian 10 System:

We need to install Remmina remote desktop client on our Debian 10 system. This can be installed with the following command:

$ sudo apt install remmina remmina-plugin-vnc

During the installation of this remote desktop client, you need to confirm by typing “Y” in your terminal, as highlighted in the image shown below:

It will take a few minutes for the installation of Remmina to complete on your Debian 10 system.

Step # 3: Launch Remmina Remote Desktop Client from your Debian 10 System:

Now, you can easily launch Remmina remote desktop client on your Debian 10 system by searching for it in the Activities search bar. You need to click on the Remmina search result as highlighted in the following image:

The welcome interface of the Remmina remote desktop client is shown in the image below:

Step # 4: Select the Virtual Network Computing (VNC) Protocol from the List of Protocols on your Debian 10 System:

For connecting to a remote desktop through Remmina remote desktop client, you need to select the Virtual Network Computing (VNC) protocol from the list of protocols on the Remmina interface as highlighted in the following image:

Step # 5: Type in the IP Address of the Remote Desktop to which you want to Connect through your Debian 10 System:

After selecting the VNC protocol, you need to type in the remote machine’s IP address whose desktop you want to access via Remmina in the provided address bar, e.g., 192.168.10.15.

You need to press the Enter key after typing in the desired IP address so that Remmina can allow you to access the specified remote desktop from your Debian 10 system, as shown in the image below:

Method of Removing the Remote Desktop Client from Debian 10:

For removing Remmina remote desktop client from your Debian 10 system, you need first to run the following command in your Debian 10 terminal:

$ sudo apt-get purge remmina remmina-plugin-vnc

This command will remove Remmina remote desktop client and its configuration files from your Debian 10 system. After doing this, you need to execute the command shown below for removing all the unused packages and dependencies as well from your Debian 10 system:

$ sudo apt-get autoremove

Conclusion:

In this tutorial, we taught you the method of installing a remote desktop client, i.e., Remmina, on a Debian 10 system and then using it for connecting to a remote desktop. This article concluded with the removal method of this remote desktop client from a Debian 10 system.

]]>
What is build-essential Ubuntu, how to install and use it? https://linuxhint.com/install-build-essential-ubuntu/ Mon, 08 Mar 2021 09:47:06 +0000 https://linuxhint.com/?p=93436 The build-essentials packages are meta-packages that are necessary for compiling software. They include the GNU debugger, g++/GNU compiler collection, and some more tools and libraries that are required to compile a program. For example, if you need to work on a C/C++ compiler, you need to install essential meta-packages on your system before starting the C compiler installation. When installing the build-essential packages, some other packages such as G++, dpkg-dev, GCC and make, etc. also install on your system.

Above, we have described what the build-essential packages are. In the rest of the article, we will explain how to install and use build-essentials on Ubuntu systems. All terminal commands we have executed on Ubuntu 20.04 system in this article. Let’s dive into the depths!

Installation and use of Build Essential tools on Ubuntu 20.04 system

The build-essential meta-packages can be installed directly from the Ubuntu official repository. These packages are available in the default Ubuntu 20.04 system repository. Just install meta-packages of build-essential tools through the apt package manager. Open the terminal application through the keyboard shortcut ‘Ctrl + Alt + t’.

Update apt repository

Now, you need to update the packages repository before installing the build-essential tools. Type the following command to update the apt repository index:

$ sudo apt update

Install build-essential

Install the build-essential packages by running the below-given command:

$ sudo apt install build-essential

After executing the above command, the following result will be shown on the terminal:

Check GCC version

Once the installation is finished, verify the installation of these packages by checking the GCC version on your system with the following command:

$ gcc --version

The installed version of GCC to be displayed on the terminal, which is also shown in the following screenshot:

Now, all GCC compiler libraries and tools have been installed on Ubuntu 20.04 system. However, you can run a C program for testing the installation.

Create C program

Let’s create a C program by using the nano editor as follows:

$ nano testprogram.c

Now, add the below-mentioned lines of code in this nano file:

// testprogram.c

#include <stdio.h>

int main() {
    printf("Test, Program!\n");
    return 0;
}

Compiling the C program

Save the above file and make an executable file by using the following command:

$ gcc testprogram.c -o testprogram

Run C program

Now, execute the following command to run the C program:

$ ./testprogram

The following output is shown on the terminal after running the above C program:

Conclusion

We have explained the installation of build-essential tools in this article. We have explored what is build-essential and how to install and use it on Ubuntu 20.04 system. Now, you should have the proper understanding of the build-essential and how to install it on the Ubuntu system. The above commands can also be applied to the older Ubuntu versions. To learn more about these required packages, must visit their official website for a better understanding.

]]>
Debian List all Running Services https://linuxhint.com/list-all-running-services-debian/ Sun, 07 Mar 2021 15:34:42 +0000 https://linuxhint.com/?p=93137 Service in any operating system is defined as a background application that keeps waiting for clients’ requests. Once it receives those requests, it performs the necessary actions so that the request can be served accordingly. Service always has a status associated with it, such as active, enabled, running, inactive, dead, etc. A system administrator is mainly concerned with the services that are currently running on an operating system. In today’s article, we will explore the different methods of listing all the running services in Debian 10.

Methods of listing all Running Services in Debian 10:

For listing all the running services in Debian 10, you can select any of the following three methods:

Method # 1: Using the “systemctl” command with the “list-units” Parameter in Debian 10:

You can use the “systemctl” command with the “list-units” parameter to list down all the running services in Debian 10 in the manner shown below:

$ systemctl list-units --type=service --state=running

When you execute the above-mentioned command, a list of all the running services in Debian 10 will be displayed on your terminal, which is shown in the following image:

Method # 2: Using the “systemctl” command without the “list-units” Parameter in Debian 10:

You can use the “systemctl” command without the “list-units” parameter to list down all the running services in Debian 10 in the manner shown below:

$ systemctl --type=service --state=running

When you execute the above-mentioned command, a list of all the running services in Debian 10 will be displayed on your terminal, which is shown in the following image:

Method # 3: Using the “pstree” Command in Debian 10:

You can use the “pstree” command to list down all the running services in Debian 10 in the manner shown below:

$ pstree

When you execute the above-mentioned command, a list of all the running services in Debian 10 will be displayed in a nice and clean tree-like structure on your terminal, which is shown in the following image:

Conclusion:

The three methods shared with you in this article aimed to demonstrate to you how you can list all the running services in Debian 10. You can employ the very same methods on Ubuntu 20.04 and Linux Mint 20, whereas the commands for CentOS 8 may differ slightly. Nevertheless, you can conveniently pick any method of your choice out of the ones shared with you in this article for listing down all the running services in Debian 10.

]]>
How to Create an ISO from Current Installation in Ubuntu 20.04 https://linuxhint.com/create-iso-current-installation-ubuntu/ Fri, 05 Mar 2021 11:43:31 +0000 https://linuxhint.com/?p=92858 In Ubuntu, most programs and operating systems can be installed through the ISO file. The ISO file format is a live identical image of the specific operating environment that contains all required installation files. Another name used for ISO files is a disc image. So, an ISO file is a perfect duplicate of the content of an optical disc, such as DVD and CD images. An ISO file is a package that consists of installation directories in an ISO format.

Users can create a backup of their current installation in an ISO file format. The ISO file can also be used as an external drive, or you can make a bootable USB. if you have an ISO file, then you can create the installation disc by burning the image to a CD or USB.

This article shows you how to create an ISO file from a currently installed Ubuntu 20.04 system. You can create an ISO file from the current installation of Ubuntu 20.04 using any of the following methods.

Create an ISO File Using the Brasero Utility

The Brasero utility does not come preinstalled on Ubuntu 20.04, so you will need to install this utility manually. Open the ‘Terminal’ window by pressing the ‘Ctrl+Alt+T’ shortcut keys together. Install the Brasero utility using the following command:

$ sudo apt-get install brasero

Once the installation has been completed, open the Brasero application. To open this application, click the menu icon displayed in the bottom-left corner of your desktop in Ubuntu 20.04.

Now, type ‘Brasero’ in the search bar to search the Brasero application. The Brasero application icon should appear in the search results. Click the icon to open this application.

The following Brasero application window will display on your system. Select the ‘Data project’ option from the menu on the left side of the window.

Add the files to the new data project by clicking the ‘+’ icon.

Now, select the individual backup directories and click the ‘Add’ button.

When all files are included in this project, click ‘Burn.’

Choose the desired location in which you will store the ISO file. Give a suitable name with an .iso extension to your ISO file and click ‘Create Image.’

Once the above process has been completed, you will be notified with an ‘image successfully created’ message, as follows:

Create an ISO File Using the Genisoimage Utility

You can create an ISO file from a backup of your Ubuntu 20.04 system using the Genisoimage utility. The basic syntax is given below:

$ genisoimage -o [file-name.iso] [ directory-path]

Here, we are creating an ISO file with the name ‘backup.iso’ from the backup directory /home/kbuzdar/Documents/Backup. Use the following command to do so:

$ genisoimage –o backup.iso /home/kbuzdar/Documents/Backup

The above command creates the ISO file ‘backup.iso’ in the current home directory.

Using the Systemback Utility

You can create a backup of the system’s file and all configurations using the Systemback utility. In this section, you will create a live image of your system, then convert it into an ISO file format.

First, import the signing key of GPG for PPA using the following command:

$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 382003C2C8B7B4AB813E915B14E4942973C62A1B

Now, add PPA to Ubuntu 20.04 by executing the command provided below:

$ sudo add-apt-repository "deb http://ppa.launchpad.net/nemh/systemback/ubuntu xenial main"

Once the above task has been completed, update the package list and install the Systemback utility, as follows:

$ sudo apt update
$ sudo apt install systemback

Once this application has been installed, search for the app in the search bar, and click on the displaying icon to open the app, as follows:

Here, you will be prompted to enter a password for the admin user.

After that, the following window will display on your system. You can create the system’s restore points, create a copy of the system to another partition, create a live system, and more. Click the ‘Live system create’ option to create a new live system.

Specify the name of your live system and click the ‘Create New’ button, as follows:

It will take time to create a live system. Once the system has been created, you can generate the ISO file using the ‘convert into ISO’ option.

Conclusion

This article showed you three different methods for creating ISO files from your current system. First, you must create a backup of your Ubuntu 20.04 system, then create the ISO file using the above utilities.

]]>
Debian Server vs. Ubuntu Server Comparison https://linuxhint.com/debian-server-vs-ubuntu-server/ Tue, 02 Mar 2021 13:03:21 +0000 https://linuxhint.com/?p=92431 When setting up a new server, a major concern that users may have is which OS to use. Many choices come into mind when it comes to the operating system to use, so selecting just one OS can be a tough choice. It is necessary for a user to compare different server types to select one that fits his or her requirements. In this article, we will compare and contrast Debian and Ubuntu servers.

Debian and Ubuntu servers are considered quite similar in many respects. Let us dig deep into a comparison of the two servers:

Upgrading the Servers

The basic difference between the two server types is the methods in which the two releases are handled. Debian is becoming quite similar to Ubuntu, but both are not totally alike. Rather, each server type has its own distinct set of differences. Debian will not offer the conventional updates that Ubuntu does; rather, Debian offers live streams of the release. An example is the apt-get package manager, which allows users to install updates and software. Users can upgrade their systems to the upcoming stable release without any kind of reboot.

Ubuntu supports its LTS (Long Term Support) version, a version of the distribution that is built upon and supported for roughly five years. On the other hand, Debian offers a total of three years of support with their respective builds. Today, Debian is becoming more and more like Ubuntu, and it has a volunteer support team to help it catch up.

Security of Setups

Ubuntu is a more secure system than Debian. Debian is considered a much stabler system and is much easier to manage than Ubuntu. In discussions on several platforms, Debian has a reputation for being more stable. There may also be a few vulnerabilities in an Ubuntu server that will not exist in a Debian server. Still, overall, Ubuntu and Debian are both widely used all over the world.

Server Support

The two servers also vary in terms of the services offered by each. Ubuntu’s support team can be hired, which can help you with installation, updating, and troubleshooting the system. Debian has no such support team; rather, Debian relies on a team of volunteers. Over time, Debian has gained the status of being a more user-friendly server. Both systems have a detailed installation process, so choosing one of them according to this criterion is an easy decision.

Support for Hardware and Software

Both server systems are based on Debian, so the software and hardware of both systems are pretty much the same. Most Ubuntu packages can run easily without any external software configurations. Meanwhile, Debian servers look for pre-existing configurations while making system updates, then they will notify the system administrators. This ability facilities users and will stop any upcoming software update errors.

Cost

Both servers come free of charge, so the price factor is not the deciding factor of which server to choose. Because both servers are free, users can opt for the operating system that is up to their requirements. You can also switch between the two systems whenever you want, but make sure that all pre-requisites are met before switching.

Conclusion

Debian and Ubuntu servers are equally useful for different purposes. This article compared and contrasted the two servers in detail based on various parameters and characteristics.

]]>
Debian Disable ipv6 on Interface https://linuxhint.com/debian-disable-ipv6-on-interface/ Tue, 02 Mar 2021 12:54:16 +0000 https://linuxhint.com/?p=92419 When you run Debian 10, the IPv6 network connections are enabled by default. But, in most situations, you need to disable the default setting of IPV6. However, we will give you a complete demo on how to disable the IPV6 interface on Debian 10 system.

To execute all commands, you must have the privileges to run the system administrative commands.

First, check if IPV6 is enabled on your Debian system or not. Open the terminal by typing the “terminal” in the search bar, and then click on the displaying Terminal icon in search results. Use the following command to check your IP address:

$ ip a

The following result will show on your terminal to determine if IPV6 is enabled.

Disable IPV6 through systemctl:

Using the following three commands input, you can disable the IPV6 on your system:

$ sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1
$ sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1
$ sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=1

After running the above commands, the IPV6 services will be disabled on your Debian system, but this is only a temporary solution. When you restart your system, it will enable it again. Verify the status by typing the “ip a” command.

To disable these IPV6 connections, you need to use /etc/sysctl.conf file. Open this configuration file in any available editor. Here, we are using a nano editor for modifying this file, as shown in the command below:

$ sudo nano /etc/sysctl.conf

Now, paste the following lines in this file and save it:

net.ipv6.conf.all.disable_ipv6=1
net.ipv6.conf.default.disable_ipv6=1
net.ipv6.conf.lo.disable_ipv6=1

Paste the below-mentioned line, if you have any specific network interface adopter such as “enp0s3”:

net.ipv6.conf.enp0s3.disable_ipv6 = 1

To verify the change settings, type the following command:

$ sudo sysctl -p

Method 1: Using sysctl.d directory

Create file in the /etc/sysctl.d directory using the following command:

$ sudo nano /etc/sysctl.d/disable-ipv6.conf

Paste the following line in this file:

net.ipv6.conf.all.disable_ipv6=1

Save and press ‘Ctrl +X’ to exit from this window.

Now, check the effect of the changes using the following command:

$ sudo sysctl -p -f /etc/sysctl.d/disable-ipv6.conf

Run the following command to verify the results:

$ ip a

As you can see in the above output, IPV6 connections have been disabled on this system.

Conclusion

We have provided you the brief information about how you can disable the IPv6 interface on your Debian 10 system. All these commands can also be executed on the Ubuntu system. If you find this article useful, then let us know with your feedback.

]]>
How to Enable Automatic Login on Ubuntu 20.04? https://linuxhint.com/enable-automatic-login-on-ubuntu-20-04/ Sat, 27 Feb 2021 12:31:05 +0000 https://linuxhint.com/?p=91750 For Ubuntu’s latest versions, users can enable automatic login for the ease of users. If enabled, then users do not need to type the password whenever they try logging in. If you are the only user of your system, then it is a very useful method for easy access to relevant files.

In this article, we will analyze the methods of enabling the automatic login on the Ubuntu 20.04 system.

Method 01: Enabling Automatic Login Using GUI

To enable the automatic login using the graphical user interface, go to the Applications of the system. Then, search Settings in the search bar, it will appear in the available options. Click on it.

Once the Settings modal is opened, scroll down to the Users option available in the sidebar.

Once you have clicked on the Users option, you will see the right pane. The toggle button is right next to the Automatic Login option. It has to be turned on to enable the automatic login.

If you see an Unlock to Change Settings option on the same pane, this means that the change settings option is locked.

To unlock it, click on the Unlock button first.

The system will ask for Authentication. Provide the password in the relevant field to unlock the change settings.

Once the Authentication is completed, you will see that the Automatic Login option is now enabled, and the toggle button is set to ON.

Method 02: Enabling Automatic Login Using the Command line

To enable the automatic login using the command line of the system, open up the terminal window using the Ctl+Alt+T shortcut. Alternatively, you can go to the Applications and then search Terminal. Once done, you need to edit the /etc/gdm3/custom.conf file using the appended command below:

$ cd /etc/gdm3

Then access the custom.conf using the nano editor (or any other based on your choice). Use the following command below:

$ sudo nano custom.conf

The custom.conf file will open up, and you need to access the highlighted section of the file. By default, the following part of the code is commented out, just like the ones shown below:

#AutomaticLoginEnable=True
#AutomaticLogin = userName

You need to uncomment these lines just like the one displayed below:

Use the Ctl+O shortcut to save and close the editor. Once done, use the reboot option to reboot the system and reflect the changes.

$ sudo reboot

Automatic Login Enable Option not working?

For Ubuntu 20.04 system, if NVIDIA proprietary driver is installed, then this option of enabling user automatic log in can result in an infinite login loop, which is a gdm3 bug. However, there’s no need to worry about this particular bug since a solution exists. In this section, we will cover the method to resolve this problem.

Open the bootable menu of the Ubuntu system. Then access the Recovery Menu of the system. Scroll down to the root option using the arrow keys from the keyboard.

To edit grub options, run the following command:

$ sudo nano /etc/default/grub

The text editor will open up the file, just like the one displayed below. Scroll down to the line that has the “quiet splash” option.

Users need to remove the “splash” keyword from the Linux cmdline. The file will then look like this:

Press Ctl+O to save the changes.

You need to refresh the grub options using the command below:

$ sudo update-grub

Then you need to reboot your computer system. This way your issue will be resolved.

Conclusion

In this article, we went through the method of enabling the Automatic Login Option on the Ubuntu 20.04 system. We also explored the method if the automatic login enables option is not working, how to troubleshoot this problem, and get it fixed.

]]>
Linux List All IP Addresses on the Interface https://linuxhint.com/list-ip-addresses-interface-linux/ Fri, 26 Feb 2021 18:07:41 +0000 https://linuxhint.com/?p=91808

All the people who belong to the networking background know that an IP address acts as a unique identifier of the devices within a network. Therefore, we must know the IP addresses of the devices within a network to enable smooth network communication. Today’s article will focus on the different methods of listing all the IP addresses on the Interface in Linux Mint 20.

Methods of listing all IP Addresses on the Interface in Linux Mint 20

For listing all the IP addresses on the Interface in Linux Mint 20, you can pick any of the following four methods.

Method # 1: Display all Network Interfaces and their IP Addresses

You can display all the network interfaces and their respective IP addresses in Linux Mint 20 by executing the built-in Command shown below:

$ ip addr show

The results from the execution of this command are shown in the following image:

Method # 2: Display all the IPv4 Addresses

If you want to display all the IPv4 addresses on the Interface only in Linux Mint 20, then you can execute the command shown below:

$ ip -4 addr

All the IPv4 addresses are shown in the following image:

Method # 3: Display all the IPv6 Addresses

If you want to display all the IPv6 addresses on the Interface only in Linux Mint 20, then you need to execute the Command shown below:

$ ip -6 addr

All the IPv6 addresses are shown in the following image:

Method # 4: Display all the IP Addresses in the Connected Network

You can also display all the IP addresses in the connected network in Linux Mint 20 by following the procedure described below:

Step # 1: Install the “arp-scan” Command in Linux Mint 20

First, you need to install the “arp-scan” Command in Linux Mint 20, which will later be used to list all the IP addresses in the connected network. This is not a built-in command in Linux, but it can be installed by executing the following Command:

$ sudo apt-get install arp-scan

Once this Command is installed on your Linux Mint 20 system, you will be able to use it for listing down all the IP addresses in the connected network.

Step # 2: Find your Network Interface Name with the “ifconfig” Command in Linux Mint 20

Before using the “arp-scan” Command, you need to find your network interface name with the command shown below:

$ ifconfig

In our case, the network interface name is “enp0s3” as shown in the following image. This network interface name will be used with the “arp-scan” Command in the next step.

Step # 3: Use the “arp-scan” Command for displaying all the IP Addresses in the Connected Network in Linux Mint 20

Now, you can use the “arp-scan” Command for displaying all the IP addresses in the connected network in Linux Mint 20 in the manner shown below:

$ sudo arp-scan --interface=NetworkInterfaceName --localnet

Here, it would be best if you replaced NetworkInterfaceName with the name of your particular network interface. In our case, it was “enp0s3” that we found out in step # 2.

The results from the execution of this Command are shown in the following image:

Conclusion

By picking any method (according to your requirements) from the ones that have been presented to you in this article, you can easily list all the IP addresses on the Interface in Linux. All of these methods have been performed on Linux Mint 20 for testing. However, the very same methods can also be employed on Debian 10 and Ubuntu 20.04.

]]>
How do I Upgrade my Linux Kernel Version on Debian 10? https://linuxhint.com/upgrade-linux-kernel-version-debian-10/ Fri, 26 Feb 2021 00:24:04 +0000 https://linuxhint.com/?p=91663 The kernel in Linux acts as a bridge to enable communication between software/applications and your machine’s hardware. It acts as the backbone of your operating system upon which the normal processing of all your system functions is based. That is why it is always good to keep it updated and upgraded regularly. In today’s article, we will be exploring the procedure of upgrading our Linux kernel version on Debian 10.

Method of Upgrading your Linux Kernel Version on Debian 10:

For upgrading your Linux kernel version in Debian 10, you have to perform the following four steps:

Step # 1: Checking the Current Kernel Version on Debian 10:

First, you should check the current version of the kernel installed on your Debian 10 system to verify if it has been upgraded or not later on. For checking the current kernel version in Debian 10, you will have to execute the command stated below:

$ uname –sr

The currently installed kernel version on our Debian 10 system is Linux 4.19.0-9-amd64, as shown in the following image:

Step # 2: Update your Debian 10 System:

You also need to update your Debian 10 system before upgrading its kernel version. Your system will look out for the available upgrades for the kernel and mark them for installation by updating them. You can update your Debian 10 system with the command shown below:

$ sudo apt-get update

When all the necessary packages on your Debian 10 system is updated, this command will finish its execution as shown in the following image:

Step # 3: Upgrade the Kernel in Debian 10:

Now we can finally attempt to upgrade our Linux kernel version in Debian 10 with the help of the command shown below:

$ sudo apt-get dist-upgrade

We have used the “dist” parameter with the “upgrade” command to smartly manage the up-gradation process by installing the required packages and removing the irrelevant ones at the same time.

During the execution of this command, you will be asked to confirm this action because doing so will occupy some additional space on your system. You can confirm the up-gradation process by pressing the “Y” key and then hitting the Enter key as shown in the following image:

When the up-gradation process finishes, the Linux kernel version on your Debian 10 system will also have been upgraded.

Step # 4: Verify the Kernel Version Upgrade in Debian 10:

To verify if the kernel version is upgraded on your Debian 10 system or not, you can run the “uname –sr” command once again, and you will be able to notice a change in your kernel version from the previous time. However, in our case, we already had the latest kernel version installed on our Debian 10 system. That is why we could not upgrade it any further and received the same kernel version as the output of the “uname –sr” command that we had received earlier. This is shown in the image below:

Conclusion:

By going through the procedure described in this article, you can conveniently upgrade your Linux kernel version in Debian 10 at any time you want. It is highly recommended that you keep repeating this process after regular intervals for your Debian 10 system’s proper functioning.

]]>
Best Debian 10 Netstat Alternative https://linuxhint.com/best-debian-netstat-alternatives/ Thu, 25 Feb 2021 23:24:39 +0000 https://linuxhint.com/?p=91610 The Socket Statistics, or ‘ss,’ command has replaced the netstat command through its incorporation of the iproute suite of tools. Using the ss command, a user can print all the relevant information about network socket connections more quickly and with more detail than the netstat command. The netstat command approach is also slower because it collects information from reading the /proc files, and it takes a significant amount of time to display several network connections at once. Meanwhile, the ss command directly collects information from kernel space. Even so, the options that are used with ss command are quite similar. So, you can easily use the ss command as an improved alternative for the netstat command.

This article covers the usage of the ss command with some straightforward examples. All the commands shown in this article were executed on the Ubuntu 20.04 distribution to check the statistics of socket and network connections.

Example 1: List Network Connection Using ss Command

You can easily list all network connections present in a system, including TCP, UDP, and UNIX socket connections, using the following ss command. The output is displayed in “less” format so that you can scroll through the output window:

$ ss | less

Example 2: List TCP, UDP, & Unix Socket Connections

You can also filter out the TCP, UDP, and UNIX socket connections using the following options:

Using only the “t” option displays connections that are ‘Connected’ or ‘Established.’ This option alone does not show you the TCP socket connections that are ‘Listening.’

$ ss –t

For TCP, use the ‘-t’ option, along with the ‘-A’ tag.

$ ss -A tcp

For UDP connections, use the following command:

$ ss -ua

$ ss -a -A udp

The ‘a’ option displays both ‘Connected’ and ‘Listening’ sockets. UDP is a connectionless protocol, so using ‘ss -u’ alone will not display anything. However, the ‘a’ can be used to show all UDP connections.

For Unix socket connections, use the following command:

$ ss x

Example 3: Display Faster Output

The “n” option used with ‘t’ prevents socket statistics from resolving IP addresses to hostnames and displays the faster output, as follows:

$ ss -nt

Example 4: Display Listening Sockets Only

You can also display only the TCP socket connections that are listening. The “n” option ignores resolving the hostnames of the IP address to display the output more quickly.

$ ss -ltn

For all UDP listening connections, replace the ‘t’ option with the ‘u’ option, as follows:

$ ss -lun

Example 5: Display Process Name with pid

You can display the process name, along with the pid of each process, using the following ss command with the ‘-ltp’ option:

$ sudo ss –ltp

Example 6: Display Statistics

The use of the ‘s’ option with the ss command displays the complete statistics, as follows:

$ ss -s

Example 7: Display Timer Details of Connection

By using the ‘-o’ option with the ss command, you can display the time information of each connection. The time details inform the user how long this connection has been maintained:

$ ss -tn -o

Example 8: Print IPV6 or IPV4 Socket Connection

To print the IPv4 socket connections only, use the ‘-4’ option with ‘-f inet,’ as follows:

$ ss –tl4

$ ss -tl -f inet

For IPV6, use the ‘-6’ option or ‘-f inet.’

$ ss -tl6

Example 9: Filter TCP Connections by State

You can also filter connections by connection state with the ss command. Connections can exist in various states, such as established, syn-recv, syn-sent, fin-wait-1, fin-wait-2, time-wait, close-wait, closed, all, last-ack, closing, connected, bucket, synchronized, and bucket.

So, according to the user requirements, you can use and filter any connection state by running the following command:

$ ss [ OPTIONS ] state [ State-name ]
$ ss -t4 state established

In the above example, we filtered all ‘established’ socket connections of TCP.

$ ss –t4 state time-wait

$ ss –t4 state connected

Example 10: Filter Address by Port Number

You can also filter the connection by the port number or by a specified IP address, as follows:

$ ss –nt dst 127.0.0.1:45807

$ sudo ss –ntlp sport gt :5000

Conclusion

This article explored the various uses of the ss command. The ss command is the best alternative for the netstat command, as you have seen in this tutorial. Using the above examples, you can easily monitor system sockets and network connections.

]]>
How Can I Sudo Another User Without A Password? https://linuxhint.com/sudo-another-user-without-a-password/ Mon, 22 Feb 2021 15:27:40 +0000 https://linuxhint.com/?p=90937

In Linux platforms, a sudo user is a tool that implies “superuser do” to run various systems’ commands. A sudo user is typically a root user or any other user who has some privileges. To delegate important tasks like server rebooting or restarting the Apache server, or even to create a backup using the sudo command, you can use the sudo without having to enter the password again and again.

By default, sudo user needs to provide some user authentication. At times, user requirements are to run a command with these root privileges, but they do not desire to type a password multiple times, especially while scripting. This is easily doable in Linux systems. In this article, we will check the method to sudo another user without entering their password.

Running sudo command without a password

To back up your sudo users, you need to copy the /etc/sudoers file from one place to another. Use the following command to do so:

$ sudo cp /etc/sudoers /root/sudoers.bak

Now, to edit the /etc/sudoers file, we will be using the visudo command. This will open up the sudoers file.

$ sudo visudo

To edit the /etc/sudoers file, users need to rectify the entries as per your need. Adding another user to sudo will allow users to execute any command without any password. In the file above, append the following command.

UserName ALL = NOPASSWD: /bin/systemctl restart httpd.service, /bin/kill

Replace the UserName with the name of the user you want to set in the file.

Then, save and exit the file using the Ctl+O shortcut.

Execute ALL sudo commands without a password

For adding a group to sudo without providing a password, use the % character before the name of your group. But first, open up the visudo editor, using the command below:

$ sudo visudo

Once you have opened up the editor window, you need to add the following line in order to add the group and to run all of the commands without a password.

%group ALL=(ALL) NOPASSWD: ALL

Here, replace the group name with the group you want to adjust the settings for.

Allowing a user to run /bin/kill

To allow a user to run the /bin/kill command using the sudo privileges without providing a password, append the following line in the same editor window:

UserName ALL=(ALL) NOPASSWD: /bin/kill

Replace the UserName with the name of the user you want to adjust the settings for.

In the same way, to enable the members of a group to run the sudo commands /bin/kill, /bin/rm without the need of entering any password, run the appended command:

%group ALL=(ALL) NOPASSWD: /bin/kill, /bill/rm

Testing the changes

To test the changes, you can now run the /bin/kill command, which will be used to kill any process whose ID is provided. This time you will not be needing a password:

$ sudo /bin/kill PID

Conclusion

In this article, we saw the method to run any command without providing the password while using sudo on different Linux platforms. Though it is considered to be risky for security purposes,  password-less operations are risky and are an extra feature for secure systems.

]]>
How do I Completely Remove a Package in Linux Mint 20? https://linuxhint.com/completely-remove-a-package-in-linux-mint/ Mon, 22 Feb 2021 15:21:26 +0000 https://linuxhint.com/?p=90944

The task of removing an installed package from any operating system can surely be a hassle if handled carelessly. It is because whenever you attempt to remove a package, you expect it not to leave any of its traces behind. In other words, you want a clean removal of the desired package. However, such a complete removal cannot be achieved without taking certain measures.

That is why today’s article will be focused on the method of completely removing a package in Linux.

Note: The method that we have attempted and shared with you in this article has been performed on a Linux Mint 20 system. However, the very same steps can also be performed on Ubuntu 20.04 and Debian 10. 

Method of Completely Removing a Package in Linux Mint 20:

For removing a package completely in Linux Mint 20, the following series of steps should be performed in the specified order:

Step #1: List Down All the Installed Packages in Linux Mint 20:

First, you should know which package you want to remove. For that, you can try listing down all the installed packages on your Linux Mint 20 system. Then from this list, you can easily figure out which package you want to remove completely. For listing down all the installed packages in Linux Mint 20, you have to execute the command shown below in the terminal:

apt list --installed

The list of all the installed packages on our Linux Mint 20 system is shown in the following image:

From this list, you can conveniently pick any package that you want to remove completely from your Linux Mint 20 system. We will be removing the “tcpreplay” package from our Linux Mint 20 system in the steps shown below.

Step #2: Remove a Package from Linux Mint 20

The first command that we will execute in this regard will simply remove a particular package without its configuration files. For this purpose, the following command is used:

sudo apt-get remove PackageName

Here, you can replace PackageName with the name of the respective package that you want to remove. In our case, the package that we wanted to remove was “tcpreplay”.

Once you execute this command, you will be prompted to confirm your action by typing “Y” and then hitting the Enter key, as shown in the image below. However, if you want the removal process to go smoothly, without asking for any confirmation, then you can use the “-y” flag after the “remove” command.

When the specified package is removed successfully, you will see the messages resembling the ones shown in the following image on your terminal:

Step #3: Remove the Configuration Files of the Said Package from Linux Mint 20

When the specified package has been removed successfully from your Linux Mint 20 system, the next step is to delete its configuration files with the command shown below:

sudo apt-get purge PackageName

Here, you can replace PackageName with the name of the respective package which configuration files you want to remove. In our case, the package configuration files we wanted to remove was “tcpreplay”.

Once the configuration files of the specified package have been removed from your Linux Mint 20 system, you will see the messages resembling the ones shown in the following image on your terminal.

Step #4: Remove all the Irrelevant Packages and Dependencies from Linux Mint 20

Finally, the last step is to clean up all the irrelevant and unused packages and dependencies from your Linux Mint 20 system that got installed along with the specified package. After the removal of the package, you will not need those packages and dependencies anymore. To get rid of them, you can execute the command shown below:

sudo apt-get autoremove

When this command successfully attempts to remove all the unused packages and dependencies from your Linux Mint 20 system, you will be able to say that your specified package has been completely removed.

Conclusion

Today’s guide walked you through the procedure of completely removing a package in Linux Mint 20. The same method can also be used on a Debian 10 or Ubuntu 20.04 system.

]]>
How Do I Perform a Traceroute on Linux Mint 20? https://linuxhint.com/perform-a-traceroute-on-linux-mint-20/ Mon, 22 Feb 2021 15:16:13 +0000 https://linuxhint.com/?p=90974

Traceroute is a very useful utility that is used to track the path that a packet takes to reach a destination within a network. It can also act as a tool to report network congestion.

In today’s article, we will discuss different examples that will demonstrate the usage of Traceroute on Linux Mint 20.

Examples of Doing a Traceroute on Linux Mint 20

For doing a Traceroute in Linux Mint 20, you first need to install the Traceroute utility with the following command:

sudo apt install traceroute –y

Once this utility is installed on your Linux Mint 20 system, these messages will be displayed on the terminal:

Now when the Traceroute utility is successfully installed, you can perform the following examples by making use of this utility in Linux Mint 20.

Example #1: Simple Usage of the Traceroute Command

The Traceroute command can be used to list down the number of hops between your source to a specified destination. All you have to do is to run this command in the manner shown below:

traceroute DestinationURL

Here, you have to replace the DestinationURL with the exact URL of the web server that you want to reach. For this case, we wanted to reach google.com, as shown in the following image:

When you run this command, it will tell you the number of hops that will be accessed while reaching this destination. In our case, that number is 30, as shown in the image below:

When the specified hop count is completed, the Traceroute will also finish, as shown in the following image:

Example #2: A Slight Variation of the Above Example

The example shown above can be modified slightly in the manner shown below:

traceroute DestinationIP

Here, you have to replace the DestinationIP with the exact IP address of the webserver that you want to reach. We wanted to reach 8.8.8.8, which is the IP address of google.com, as shown in the following image:

Again, this command will tell you the number of hops that will be accessed while reaching this destination. In our case, that number is 30, as shown in the image below:

When the specified hop count is completed, the Traceroute will also finish, as shown in the following image:

Example #3: Limiting the Number of Hops to Reach a Destination

The default number of hops to reach any destination is 30. However, you can reduce this number so that the Traceroute can finish as soon as the specified number of hops is reached. You can do this with the command shown below:

traceroute –m HopCount DestinationURL

Here, you have to replace the DestinationURL with the exact URL of the web server that you want to reach and HopCount with the number of hops that you want to traverse. We wanted to reach google.com, and the number of hops is 10, as shown in the following image:

Now, you will notice that this command will show the maximum hop count as 10, as shown in the image below:

When the 10 hops are traversed, the Traceroute will finish, as shown in the following image:

Example #4: Stop Resolving the IP Addresses to Domain Names during the Traceroute

You can even stop resolving the IP addresses to domain names during the Traceroute with the command shown below:

traceroute –n DestinationURL

Here, you have to replace the DestinationURL with the exact URL of the web server that you want to reach. We wanted to reach google.com, as shown in the following image:

When you run this command, it will tell you the number of hops that will be accessed while reaching this destination. In our case, that number is 30, as shown in the image below:

When the specified hop count is completed, the Traceroute will finish, as shown in the following image:

Example #5: Setting the Timeout Limit for Traceroute

The default timeout value for which Traceroute waits to receive responses from hops is 5 seconds. You can increase or decrease this limit in the manner shown below:

traceroute –w TimeoutLimit DestinationURL

Here, you have to replace the DestinationURL with the exact URL of the web server that you want to reach and TimeoutLimit with a floating-point value of your choice. We wanted to reach google.com, and the TimeoutLimit is 3.0, as shown in the following image:

When you run this command, it will tell you the number of hops that will be accessed while reaching this destination. In our case, that number is 30, as shown in the image below:

When the specified hop count is completed, the Traceroute will finish, as shown in the following image:

Conclusion

For using Traceroute in Linux Mint 20, you can go through the examples shared with you in this article. They will help you a lot in understanding the correct usage of this utility in Linux.

]]>
Install Python PIP Debian 10 https://linuxhint.com/install-python-pip-debian-10/ Sun, 21 Feb 2021 21:02:20 +0000 https://linuxhint.com/?p=90773 PIP is a command-line package manager of python that allows you to manage and install new python-based software packages.  Using this tool allows users to search for packages from the python packages index as well as install its dependencies. Python pip-tools are not readily installed on most Linux operating systems. However, you can manually install the python-pip utility on your Debian and other Linux distributions.

Today, we will show how you can install python-pip packages on the Debian 10 system through the command-line application. All commands of this article have been implemented on the Debian 10 buster environment. Almost all these steps can also be used on Ubuntu and Linux Mint operating environments.

Pip Installation on Debian 10 system

Python has two different versions, python2 and 3. However, you need to separately install python pip-tools for both python versions. Open the terminal from the application menu and then start the installation of a python-pip using the following method:

Install pip for python2

The following steps are included while you install the pip tool for python2 on Debian 10:

Step 1: Update system packages 

Run the following command to update the system package list:

$ sudo apt update

Step 2: Install Pip

First, ensure the installation of python2 on your system by running the following command:

$ python2 -V

The installed version will be displayed on the terminal. Now, type the following command to install the pip tool for Python2:

$ sudo apt install python-pip

The above command will automatically install pip with all its dependencies on your system.

Step 3: Check pip version

Once all packages are installed, issue the following command to check the installed version of the pip tool for python2:

$ pip –version

The installed version will be displayed on the terminal after running the above command.

Install Pip for python 3

Similarly, the following command you need to implement on the terminal to install pip-tools for python 3 is shown below:

Step 1: Update the Packages list by running the following command:

$ sudo apt update

Step 2: Install pip along with all dependencies for python 3 by executing the following command:

$ python3 –V

$ sudo apt install python3-pip

Step 3: verify the pip installation using the following command:

$ pip3 --version

Use of Pip 

We will also explore the use of pip in this article. By using pip, the user can install python packages from PyPI, local projects, version control, and other project distributions. Usually, the pip would be used inside the virtual environment. Python virtual environment allows you to install python packages inside an isolated space without disturbing the other python project modules.

Let’s discuss some useful pip commands that are mentioned below.

With pip, you can list all packages, as follows:

$ pip list

You can search for a package through pip, using the following command:

$ pip3 search “package-name”

With pip, you can install a python package from PyPI, as follows:

$ pip3 install package-name

For example, we want to install a python package ‘scrapy’ through pip. So, the following command is what you need to enter on the terminal:

$ pip3 install scrapy

You can also display the package information using the following commands:

$ pip3 show package-name
$ pip3 show wheel

The command below allows you to remove or uninstall a package through pip3:

$ pip3 uninstall package-name

To uninstall the scrapy package, run the below-mentioned command:

$ pip3 uninstall scrapy

That’s all about the basic commands of the pip tool. To explore more commands and options about pip, run the following command on the terminal:

$ pip3 –help

All pip commands and option will be displayed on the terminal as follows:

Conclusion

In this article, we have learned how to install the python-pip tool for python 2 and python 3 on the Debian 10 buster system. We have executed various commands to understand the use of pip. Moreover, we have also explained the use of the pip tool.

]]>
How to Install SOGo Groupware on Debian 10 https://linuxhint.com/install-sogo-groupware-debian/ Wed, 03 Feb 2021 04:08:56 +0000 https://linuxhint.com/?p=88626 SOGo Groupware is a free and modern scalable collaboration software. It allows users to share calendars, emails, and address books with the community through a web interface. SOGo web interface supports various native clients such as Mozilla Thunderbird and Lightning using the same standard protocols such as Microsoft ActiveSync, CardDAV, and GroupDAV. It is mostly used in production environments where we are dealing with several users. In this post, we will describe how to install SOGO Groupware on the Debian system.

Note: We will be explaining the commands and procedure on Debian 10 (Buster) system. You should

Installing SOGo Groupware on Debian 10

Step 1: Install Apache

Firstly, update the system repository index as follows:

$ sudo apt update

Enter the sudo password.

Now install Apache using the below command in Terminal:

$ sudo apt install apache2

Step 2: Install and Configure MariaDB

We will need to install MariaDB as a database backend for SOGo. Execute the below command to install the MariaDB server on your system:

$ sudo apt install mariadb-server

Now you might be prompted with the Y/n choice to carry on the installation of MariaDB. Press Y to proceed.

Now execute the below command in Terminal to improve the security of your MariaDB installation:

$ sudo mysql_secure_installation

When asked to enter the current password for root, just press Enter. After that, you will be asked to set a new root password so that no one can login as a MariaDB root user without authentication. Press y if you want to set a new password for MariaDB root. Then enter the password twice.

Now press y for all subsequent questions also shown highlighted in the following screenshot.

Step 3: Install SOGo

Sogo can be installed easily via an apt command-line utility. However, we will first need to add its repository to our system’s local repositories. Follow the below steps to do so:

To install SOGo in your Debian system, first, add the SOGo repository to the sources.list file. In the Terminal, execute the below command to edit the sources.list file:

$ sudo nano /etc/apt/sources.list

Now to add the SOGo repository, add the below line at the end of the file:

deb http://packages.inverse.ca/SOGo/nightly/2/debian/ buster buster

Now save and close the sources.list file.
Add key for SOGo repository using the following command:

$ sudo apt-key adv --keyserver keys.gnupg.net --recv-key 0x810273C4

After adding a new repository, you will need to update the local repository index. Use the below command to do so:

$ sudo apt update

Once the update is completed, you can install SOGo as follows:

$ sudo apt install sogo

Now you might be prompted with Y/n (yes/no) option for proceeding with the installation. Press Y to proceed.

Once SOGo is installed, start its service using the below command:

$ sudo systemctl start sogo

To automatically start the SOGo service at boot, execute the below command in Terminal:

$ sudo systemctl enable sogo

Now start MySQL using the below command in Terminal:

$ sudo mysql

Now we will create a database and a user. Issue the following to create a database “sogo”:

$ CREATE DATABASE sogo;

Now create a user named “sogo” with the password “password”.

$ GRANT ALL ON sogo.* TO 'sogo'@'localhost' IDENTIFIED BY 'password';

First, connect to the database to run subsequent commands:

$ USE sogo;

Then create a database table to hold user information.

$ CREATE TABLE sogo_users (c_uid VARCHAR(10) PRIMARY KEY, c_name VARCHAR(10), c_password VARCHAR(32), c_cn VARCHAR(128), mail VARCHAR(128));

Now add an entry in the table for a user:

$ INSERT INTO sogo_users VALUES ('sim', 'sim', MD5('sim123'), 'Sim Sam', sim@ domain.com');
$ flush privileges;
$ exit;

Now we will have to enable some of the Apache modules. Execute the below command in Terminal to do so:

$ sudo a2enmod proxy proxy_http headers rewrite

After the modules are enabled, restart apache as follows:

$ sudo systemctl restart apache

Step 4: SOGo Configuration

Now we will configure SOGo to make it use the MySQL database that we have created in previous steps. We will do configurations under the user “sogo”. For this purpose, issue the following command to change the user:

$ su sogo

Then execute the below commands for SOGo configurations. Make sure to replace the Country/Region with your timezone, and domain.com with your actual domain. Also, replace password with the password you have set during database creation.

$ defaults write sogod SOGoTimeZone "Country/Region"
$ defaults write sogod SOGoMailDomain "domain.com"
$ defaults write sogod SOGoLanguage "English"
$ defaults write sogod SOGoUserSources '({canAuthenticate = YES; displayName = "SOGo Users"; id = users; isAddressBook = YES; type = sql; userPasswordAlgorithm = md5; viewURL ="mysql://sogo:<strong>password</strong>@127.0.0.1:3306/sogo/sogo_users";})'
$ defaults write sogod SOGoProfileURL 'mysql://sogo:password@127.0.0.1:3306/sogo/sogo_user_profile'
$ defaults write sogod OCSFolderInfoURL 'mysql://sogo: password @127.0.0.1:3306/sogo/sogo_folder_info'
$ defaults write sogod OCSSessionsFolderURL 'mysql://sogo: password @127.0.0.1:3306/sogo/sogo_sessions_folder'
$ defaults write sogod SOGoLoginModule Calendar
$ defaults write sogod SOGoSieveScriptsEnabled YES
$ defaults write sogod SOGoAppointmentSendEMailNotifications YES
# The default port for SOGoSieveServer was 2000 but now it is 4190
$ defaults write sogod SOGoSieveServer sieve://localhost:4190
$ defaults write sogod SOGoVacationEnabled YES
$ defaults write sogod SOGoMailMessageCheck every_5_minutes
$ defaults write sogod SOGoFirstDayOfWeek 1
# following is the configuration for mailbox
$ defaults write sogod SOGoSentFolderName "INBOX.Sent"
$ defaults write sogod SOGoTrashFolderName "INBOX.Trash"
$ defaults write sogod SOGoDraftsFolderName "INBOX.Drafts"
$ defaults write sogod NGImap4ConnectionStringSeparator "."
$ exit

Now restart SOGo service using the below command:

$ sudo systemctl restart sogo

Now modify the SOGo configuration file for apache to use localhost with no SSL. You can find the SOGo configuration file for Apache at /etc/apache2/conf.d/SOGo.conf.

Edit the file using the below command:

$ sudo nano /etc/apache2/conf.d/SOGo.conf

Now find the following lines and replace 443 with 80 and yourhostname with localhost.

RequestHeader set "x-webobjects-server-port" "<strong>443</strong>"
RequestHeader set "x-webobjects-server-name" "<strong>yourhostname</strong>"
RequestHeader set "x-webobjects-server-url" https://yourhostname

It should now look like this:

RequestHeader set "x-webobjects-server-port" "80"
RequestHeader set "x-webobjects-server-name" "localhost"
RequestHeader set "x-webobjects-server-url" "http://localhost"

Then to check for any configuration errors, execute the below command in Terminal:

$ sudo apachectl configtest

If you receive the following output, it means configurations are fine.

Syntax OK

Now restart the Apache server as follows to apply the configuration changes:

$ sudo systemctl restart apache2

Now access the following address in any web browser from the same system on which SOGO is installed:

http://localhost/SOGo

You should now see the SOGo login page where you can log in using your admin username and password, which are ‘sim’ and ‘sim123’.

Uninstalling SOGo

In case you no longer need SOGo Groupwarw, you can easily remove it from your system. Execute the below command in Terminal to uninstall SOGo from your Debian system:

$ sudo apt remove sogo

When you install SOGo, some dependencies are also installed with it. To remove those dependencies too, execute the below command in Terminal:

$ sudo apt remove --auto-remove

Alternatively, if you want to uninstall SOGo along with all configuration files, execute the below command in Terminal:

$ sudo apt purge sogo

Then to remove the dependencies too, execute the below command in Terminal:

$ sudo apt purge --auto-remove

That is all there is to it! In this post, you have learned how to install and configure SOGo groupware on Debian OS. For advanced configurations, visit SOGo official documentation. ]]> How to Install Diaspora Decentralized Social Media on Debian 10 https://linuxhint.com/install-diaspora-debian-10/ Tue, 02 Feb 2021 19:21:39 +0000 https://linuxhint.com/?p=88783

Diaspora is a privacy-aware distributed and an open-source, decentralized social network. It comprises a collection of independently owned and deployed nodes that are incorporated to create the social network. This article will show the installation procedure of Diaspora distributed social network on the Debian 10 system.

Prerequisites

All commands should run under administrative privileges.

Follow the following procedure to install the diaspora decentralized social media on Debian 10:

Step 1: Install the required packages

Install the required dependencies for diaspora installation such as Redis, PostgreSQL, and Nginx web server.

$ sudo apt-get install build-essential cmake gnupg2 libssl-dev libcurl4-openssl-dev libxml2-dev libxslt-dev imagemagick ghostscript curl libmagickwand-dev git libpq-dev redis-server nodejs postgresql

Enable and start the Redis and PostgreSQL services after completing the installation of required packages. Add all of them to the Debian system boot by using the following commands:

$ systemctl start redis-server

$ systemctl enable redis-server

$ systemctl start postgresql

$ systemctl enable postgresql

Step 2: Create PostgreSQL new user for diaspora

Change the f=default ‘Postgres’ user password and create a PostgreSQL user for the diaspora.

By using the ‘psql’ command, Log in to the PostgreSQL shell.

$ sudo -i -u postgres psql

Now, change the ‘postgres’ default user password by using the following command:

# \password postgres

Enter the new password and again re-enter the password for confirmation.

Create a new user named ‘diaspora’ who have certain privileges ‘CREATEDB’:

# CREATE USER diaspora WITH CREATEDB PASSWORD 'yourpassword';

Type ‘exit’ on the terminal to leave the PostgreSQL shell window.

Step 3: Create a new diaspora user

Once the PostgreSQL user for diaspora is created, you will create a system user named ‘diaspora’ and then include it into the sudo group.

By using the following commands, create a new system user named ‘diaspora’ and assign its password:

$ sudo adduser --disabled-login Diaspora

$ sudo passwd diaspora

Add the above user ‘diaspora’ into the sudo group by running the below-given command:

$ sudo usermod -a -G sudo diaspora

Now, this user can run all administrative sudo commands on this system.

Step 4: Installation of RVM and Ruby Packages

Log in as a diaspora user on your system by executing the following command:

$ su - diaspora

Enter the password that you have been set above for a diaspora system user.

Now, start the installation of Ruby Version Manager (RVM) and install Ruby packages for the ‘diaspora’ user.

Include the RVM GPG key by running the following command:

$ sudo gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB

Next, install the RVM by executing the following command:

$ curl -sSL https://get.rvm.io | bash -s stable

Once the RVM installation is completed, load the script on your system by using the following command:

$ source /home/diaspora/.rvm/scripts/rvm

Now, using the rvm commands, you can install ruby packages on your system. So, use the following command to install Ruby 2.6:

$ rvm install 2.6

Once the installation of Ruby is completed, check the installed version by executing the following command:

$ ruby --version

Step 5: Download and set up Diaspora

Download the source code of diaspora by using the following git clone command:

$ git clone -b master <a href="https://github.com/diaspora/diaspora.git">https://github.com/diaspora/diaspora.git

Navigate into the diaspora directory and copy or duplicate the database configuration ‘database.yml’ and the diaspora configuration ‘diaspora.yml’.

$ cd diaspora

$ cp config/database.yml.example config/database.yml

$ cp config/diaspora.yml.example config/diaspora.yml

Open the configuration files in the most friendly nano text editor and edit them.

For database configuration:

$ sudo nano config/database.yml

Edit the PostgreSQL section with your username and password as follows:

postgresql: &postgresql

  adapter: postgresql

  host: "localhost"

  port: 5432

  username: "diaspora"

  password: "yourpassword"

  encoding: unicode

Press ‘Ctrl + O’ to save changes and then press ‘Ctrl +X’ to exit from the nano.

Now, edit the ‘config/diaspora.yml’ file.

$ sudo nano config/diaspora.yml


configuration: ## Section

::::::::::

  environment: ## Section

:::::::::

    url: "https://example.org/"

    certificate_authorities: '/etc/ssl/certs/ca-certificates.crt'

    require_ssl: true

::::::::

  server: ## Section

    rails_environment: 'production'

:::::

Save the configuration exit from the current displaying window by pressing ‘Ctrl+O’.

Now, you need to install the gem and required ruby libraries for the diaspora.

$ gem install bundler

$ script/configure_bundler

$ bin/bundle install --full-index

After that, you need to migrate the database by executing the following command:

$ RAILS_ENV=production bundle exec rake db:create db:migrate

Combine all rails assets as follows:

$ RAILS_ENV=production bin/rake assets:precompile

Step 6: Configure diaspora as a Service

Once the diaspora installation is completed, you will set up the Diaspora as a systemd service.

Navigate into ‘/etc/systemd/system’ directory and create a new service file using the nano editor as follows:

$ cd /etc/systemd/system/

$ sudo nano diaspora.target

Paste the following lines in this file:

Save and exit from the nano editor.

Now, create a new service file named ‘diaspora-web.service’ using the nano command:

$ sudo nano diaspora-web.service

Paste the following code in it:

Save and exit from the nano.

Create a new file for monitoring services with named ‘diaspora-sidekiq.service’ using the nano command as follows:

$ sudo nano diaspora-sidekiq.service

Paste the following configuration code in it:

Save and exit from the current window.

Now, reload the systemd services and enable the following diaspora services on your system:

$ sudo systemctl daemon-reload

$ sudo systemctl enable diaspora.target diaspora-sidekiq.service diaspora-web.service

Now, start all services and get status by using the following commands:

$ sudo systemctl start diaspora.target

Enter the password and continue the process.

$ systemctl status diaspora-web

$ systemctl status diaspora-sidekiq

From the above results, you can verify that the Diaspora is running as a systemd service. The basic configuration for Diaspora has been completed now.

Step 7: Generate SSL certificate

To make your domain more secure, generate the SSL Letsencrypt certificate. For this purpose, install the certbot using the following command:

$ sudo apt install certbot

Generate the SSL letsencrypt certificate by replacing the mentioned domain name with your domain as follows:

You can find your SSL certificate in the ‘/etc/letsencrypt/live/yourdomain.com/’ directory in your system. Now, install Nginx as follows:

Configure diaspora with Nginx.

Testing

Once you have configured all diaspora services, add your domain name to your browser’s address bar.

http://youdomain.com/

Conclusion

That’s all about the Diaspora installation on your Debian 10 system. By using the above steps, you can easily install the Diaspora Decentralized Social Media on your Debian system. Thanks.

]]>
How to Install JetBrains IntelliJ in Debian https://linuxhint.com/install-jetbrains-intellij-debian/ Sat, 30 Jan 2021 17:35:09 +0000 https://linuxhint.com/?p=88288 JetBrains IntelliJ IDEA is a popular environment for application development. IntelliJ IDEA was developed by JetBrains. JetBrains IntelliJ IDEA contains several built-in tools, including auto code completion, database integration, terminal, inline debugger, and more. The core packages of IntelliJ IDEA support the Groovy, Java, XML, and Kotlin languages. You can also install various plugins to support other programming languages, such as Perl, Python, and Go.

This article provides a guide for installing JetBrains IntelliJ IDE on your Debian 10 system.

Prerequisites

To install JetBrains IntelliJ IDE on your Debian 10 system, you will need privileged access to run the sudo command or log in as a root user.

Installing IntelliJ IDE in Debian 10

IntelliJ IDEA can be installed in Debian 10 using either of the following two methods:

  • Install IntelliJ IDEA Using Snap
  • Install IntelliJ IDEA Using the Official Package

Install IntelliJ IDEA Using Snap

Using this method, you can install IntelliJ IDEA through the snap package manager on your system. If it is not already installed on your system, issue the following command to install snapd:

$ sudo apt update && sudo apt install -y snapd

Start the snapd Service

Enter the following command to start the snapd service on your system:

$ systemctl start snapd.service
$ systemctl status snapd.service

Use the following command to install the IntelliJ IDEA community edition through the snap.

$ sudo snap install intellij-idea-community --classic

Depending upon your Internet speed, the installation will take some time to complete.

Launch IntelliJ IDEA

You can launch the IntelliJ IDEA application via the application search bar. Click the Activities section present in the top-left corner of your Debian 10 system, and type ‘IntelliJ IDEA’ in the search bar. The IntelliJ IDEA icon will appear in the search result. Click the icon to launch this program.

Select the checkbox to accept the terms of the User Agreement and click Continue to proceed.

In the setup wizard, you will decide whether to enable the data sharing policy with anonymous users.

In the next step, you will see that IntelliJ IDEA has been launched on your system.

Some plugins are enabled by default. Here, you can disable the unnecessary tools or plugins, according to your needs and requirements.

Remove IntelliJ IDEA

To uninstall the IntelliJ IDEA from your Debian system using the snap package manager, issue the following command:

$ sudo snap remove intellij-idea-community

Install IntelliJ IDEA Using the Official Package

You can download IntelliJ IDEA from its official package repository using the wget command. Issue the following command to download the latest release of IntelliJ IDEA:

$ wget <a href="https://download-cf.jetbrains.com/idea/ideaIC-2020.1.tar.gz">https://download-cf.jetbrains.com/idea/ideaIC-2020.1.tar.gz</a>

The downloaded file will save in the compressed .tar format. To extract the .tar file, issue the following command:

$ tar -zxvf ideaIC-*.tar.gz

Now, create a new directory and add some permissions to it. Navigate to the directory, and run the following command:

$ sh idea.sh

After entering the above command, you will see the following welcome screen appear:

Conclusion

This article showed you how to install IntelliJ IDEA installation on your Debian 10 system. We showed you how to install this application using two different methods, including the snap package and the official package. Please give us your opinion in case of any problems.

]]>
How to Install GitScrum in Debian 10 https://linuxhint.com/install-gitscrum-debian/ Sat, 30 Jan 2021 15:29:49 +0000 https://linuxhint.com/?p=88037

GitScrum is a free, open-source task management tool that you can use to manage projects with ease. GitScrum uses the famous Git platform and Scrum software methodology to allow for more effective team management. This software helps users to track time consumed to perform various tasks and keep a record of projects that users are working on. Users can create multiple projects, keep a record of projects assigned to different users, and even chat in real-time. This article shows you how to install GitScrum in Debian 10.

Prerequisites

  • Access to a Debian 10 server
  • A valid domain name to point the server IP
  • Root user privileges

Installing GitScrum in Debian 10

To install GitScrum in Debian 10, first, open the terminal window using the Ctrl+Alt+T shortcut. Then, update the system to the latest available version by issuing the following command:

$ apt-get update -y

After that, upgrade the apt package using the command given below:

$ apt-get upgrade -y

Now that the system and apt package have been updated, we will begin the installation process.

Step 1: Install LAMP Server

First, you will need to install an Apache webserver, MariaDB server, and PHP, along with the extensions that are needed for the LAMP server. To install the LAMP server, enter the following command:

$ apt-get install apache2 mariadb-server libapache2-mod-php php php-cli php-common php-mailparse php-mysql php-gmp php-curl php-mbstring php-imap php-ldap php-gd php-xml php-cli php-zip php-yaml php-dev php-pear unzip curl git -y

Step 2: Edit PHP File and Authenticate System

Once you have installed the server, open the php.ini file to make some edits:

$ nano /etc/php/7.3/apache2/php.ini


In the file, change the following values:

memory_limit = 256M

upload_max_filesize = 100M

max_execution_time = 300

date.timezone = Asia/Kolkata

Save the modified file using the Ctrl+O shortcut.

Now, start the Apache and MariaDB service. Issue the following command in the terminal to start Apache:

$ systemctl start apache2


If the system asks for authentication, simply enter the password and click the Authenticate button.

Now, start the MariaDB service using the following command:

$ systemctl start mariadb


Complete the authentication process.

Enable apache to start after system reboot using the command below:

$ systemctl enable apache2


Authenticate the system.

After that, an output will appear that is similar to this one:

Enable MariaDB to start after system reboot using the following command:

$ systemctl enable mariadb


Then, authenticate the system.

Step 3: Configure MariaDB Database

The MariaDB root password is configured initially, so, you will be required to set a password. Log in to the MariaDB shell using the following command:

$ sudo mysql

After you hit Enter, the output will appear as follows:


Set up the password using the following command:

MariaDB [(none)]> SET PASSWORD FOR 'root'@'localhost' = PASSWORD("rootpassword");


Provide values for the root user and localhost, then enter the password you want to set.

After that, create the database and a user for GitScrum using the command provided below:

MariaDB [(none)]> CREATE DATABASE gitscrumdb;


Next, create the GitScrum user using the following command:

MariaDB [(none)]> CREATE USER 'gitscrumuser'@'localhost' IDENTIFIED BY 'password';


The next step is to grant all the rights and privileges of the GitScrum database using the following:

MariaDB [(none)]> GRANT ALL ON gitscrumdb.* TO 'gitscrumuser'@'localhost' WITH GRANT OPTION;

Flush the privileges using the command given below:

MariaDB [(none)]> FLUSH PRIVILEGES;

And then, exit by issuing the following:

MariaDB [(none)]> EXIT;

Step 4: Install Composer

Composer is the supporting manager for the PHP package that is a must-have for our project. Download the composer file using the following command:

$ php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"


To confirm the download and data integrity of the file, issue the command given below:

HASH="$(wget -q -O - https://composer.github.io/installer.sig)" php -r "if (hash_file('SHA384', 'composer-setup.php') === '$HASH') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"


The phrase Installer Verified in the output shows that everything is running correctly.

To install the composer, run the following command:

php composer-setup.php --install-dir=/usr/local/bin --filename=composer


After some time, you will see an output like this one:

Step 5: Install GitScrum

First, change the directory to your Apache root directory. Then, you can download GitScrum.

$ cd /var/www/html


To download GitScrum, use the following command:

$ composer create-project gitscrum-community-edition/laravel-gitscrum --stability=stable --keep-vcs


When you press Enter, the installation will begin. After some time, you will see an output like this:


Update and change the directory to the downloaded directory. Next, update GitScrum with the following command:

$ cd Laravel-gitscrum


Once you are in the directory, enter:

$ composer update


To integrate GitScrum with Github, you will have to create an app in Github. Access this link, and you will see the following screen appear:


Log in to your account or sign up for a new one. Then, you will see the screen to Register a new OAuth application. Provide the Application name, Homepage URL (which must be running and responding to server requests), and Application callback URL.

Then, click Register Application. After that, you will see the following screen appear:


The next step is to use the Client ID and Client Secret from the application registration page and paste them into the .env file. Access the file using the following command:

$ nano /var/www/html/laravel-gitscrum/.env


Here, provide the Client ID and Client Secret, then close the file using the Ctrl+O shortcut.

Run the following command to migrate the database:

$ php artisan migrate

Then, enter the following command:

$ php artisan db:seed

After that, change the permissions using the command given below:

$ chown -R www-data:www-data /var/www/html/laravel-gitscrum/

The permissions will begin to change; once they are done, update the other set of permissions using the following command:

$ chmod -R 775 /var/www/html/laravel-gitscrum/

Configuring Apache for GitScrum

To configure the Apache virtual host for GitScrum, access the file using the following command:

$ nano /etc/apache2/sites-available/gitscrum.conf


Add the following lines of code to the file. Replace ServerAdmin and ServerName with the server you want to configure it with.

<VirtualHost *:80>

ServerAdmin admin@websitename.com

# Admin Server address

DocumentRoot /var/www/html/laravel-gitscrum/public

# Path to the document root directory

ServerName test.website.com

# Name or URL of the the server

<Directory /var/www/html/laravel-gitscrum/public>

Options FollowSymlinks Allow

# Path or directory and the permissions

Override All Require all granted </Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log

# Calling the error logs if any

CustomLog ${APACHE_LOG_DIR}/access.log

# Calling the custom logs

combined </VirtualHost>


Save the file. To check the Apache configuration, use the following command:

$ apache2ctl configtest


The syntax OK means that the output is correct.


Enable the virtual host and Apache rewrite module using the command given below:

$ a2ensite gitscrum.conf

Now, rewrite the module using the following command:

$ a2enmod rewrite


Restart the Apache webserver/service to reflect these changes:

$ systemctl restart apache2

Here, provide the authentication to restart the service:

To check the status of the Apache service, use the following command:

$ systemctl status apache2

The output shows that the server is running properly.


The last step is to access the GitScrum website based on the URL you used in the implementation process. Then, you will authorize your account to use GitScrum in Debian 10.

Conclusion

This article showed you how to install and configure GitScrum on a Debian 10 server. We began with the installation of the LAMP server, then installed Composer and GitScrum, and finally performed the necessary configurations. Feel free to use this method to install and configure GitScrum using Apache and other supporting packages on your Debian 10 server.

]]>
How to Configure LDAP Client in Debian 10 https://linuxhint.com/configure-ldap-client-debian/ Sun, 24 Jan 2021 15:33:48 +0000 https://linuxhint.com/?p=87306 LDAP is an acronym for Lightweight Directory Access Protocol. LDAP allows users to store the usernames and passwords of users in a single place. This place is then used by multiple services for validating the users claiming these services. To use a service, you always need to have a client-end program that can help you to access that service. This article shows you how to install and configure the LDAP client on your Debian 10 system.

Method of Configuring the LDAP Client in Debian 10

To configure the LDAP client on a Debian 10 machine, perform the following fifteen steps. The configurations may vary according to your unique requirements and usage of the LDAP client. The following steps will guide you through some of the more generic LDAP client configurations.

Step 1: Install LDAP Client and Required Packages

First, install the LDAP client and all the packages necessary for LDAP to work properly in Debian 10 by issuing the command below:

sudo apt install libnss-ldap libpam-ldap ldap-utils

As soon as this command starts its execution, you will be able to see an interactive prompt, in which you can perform the various LDAP configurations explained in the following steps.

Step 2: Configure URI for LDAP Server

Next, set up the URI for your LDAP server. The server format is also shown in the following image. Then, press the Enter key to proceed to the next configuration.

Step 3: Set Up Distinct Name for LDAP Search Base

Now, you will set up a distinct name for the LDAP search base. An example is shown in the image below. Then, press the Enter key to go to the next screen.

Step 4: Choose Desired LDAP Protocol Version

There are different LDAP protocol versions available to use; however, it is always recommended to use the latest available version, which, in this case, is version 3. After selecting this version, press the Enter key to confirm your choice, as shown in the following image:

Step 5: Select LDAP Account for Root

Now, specify an account that will be used as the LDAP root user account, after which you will press the Enter key.

Step 6: Set Up Password for LDAP Root Account

Once the LDAP root account has been selected, you will need to set up a password for this account. Type in a password of your choice and then press the Enter key to go to the next screen.

Step 7: Remove LDAP Entries from Configuration File

For the basic LDAP services to function properly, it is recommended to remove the default LDAP entries from the configuration file. This can be done simply by pressing the Enter key or the OK button in the prompt, as shown in the image below:

Step 8: Allow LDAP Admin Account to Behave Like Local Root

Now, allow the LDAP admin account to behave like a local root account by selecting the Yes option from the dialogue box, as shown in the following image:

Step 9: Disable Login for LDAP Database

You can disable the login for the LDAP database by selecting the No option from the dialogue box, as shown in the image below. This will remove the need for authentication at the time of retrieving the LDAP entries.

Step 10: Enter Name of LDAP Administrative Account

Now, enter the name of the LDAP root account that you set up earlier. After that, press the Enter key to continue.

Step 11: Enter Password for LDAP Root Account or Administrative Account

Finally, enter the password for the LDAP root account or administrative account that you set up in Step 6, then press the Enter key, as shown in the image below:

After doing this, the command that you executed in Step 1 will finish its execution while rendering the following messages in your Debian 10 terminal:

Step 12: Update PAM Configurations

Next, configure your Debian 10 system to use LDAP for authentication. To do so, update the PAM configurations by running the following command:

sudo pam-auth-update

This command will display a dialogue box on your screen from which you can select any desired profiles that you want to be enabled. It is recommended to go with the default profile. Then, to continue, press the Enter key.

Step 13: Allow Automatic Creation of User’s Home Directory

You can also choose to allow the automatic creation of the user’s Home directory. To do so, you will edit the Common Session PAM file. This file can be accessed by using the following command:

sudo nano /etc/pam.d/common-session

When this file opens with the nano editor, enter the following line of code at the end of this file:

session required pam_mkhomedir.so skel=/etc/skel umask=077

After adding this line, press Ctrl + X to save your file and exit the nano editor.

Step 14: Restart Name Service Cache Daemon (nscd)

Restart the name service cache daemon (nscd) so that it can read the new configurations. The ncsd can be restarted with the following command:

sudo systemctl restart nscd

Restarting this service will not display any messages in the terminal.

Step 15: Enable Name Service Cache Daemon (nscd)

Finally, re-enable the name service cache daemon (nscd) with the command below:

sudo systemctl enable nscd

This command will display the following messages in the terminal upon successful execution:

This step brings us to the end of the LDAP client configurations in a Debian 10 system.

Method of Removing LDAP Client from Debian 10

If you no longer feel like using the LDAP client for Debian 10, you can conveniently remove it, as well as its configuration files, with the command below:

sudo apt-get purge libnss-ldap libpam-ldap ldap-utils

When this process is completed, the terminal will show the following messages:

Finally, to remove any extra packages that were installed with the LDAP client, issue the following command:

sudo apt-get autoremove

This command will remove all the packages that are no longer needed after removing the LDAP client from Debian 10.

Conclusion

This article explained how to configure the LDAP client on a Debian 10 system. These configurations are extremely easy to perform and will not take more than 10 minutes to do. Finally, we also showed you how to uninstall the LDAP client from your Debian 10 machine.

]]>
How to Install and Configure NIS Server on Debian 10? https://linuxhint.com/install-nis-server-debian-10/ Sun, 24 Jan 2021 05:01:24 +0000 https://linuxhint.com/?p=87252 NIS stands for Network Information Service, and it is used extensively for sharing configuration data about different systems across the whole network. In today’s article, we will be talking about the methods of installing and configuring this server on a Debian 10 system.

Method of Installing the NIS Server on Debian 10:

For installing the NIS server on a Debian 10 machine, you will have to perform three basic steps:

Step # 1: Update your Debian 10 System:

First, you have to update your system with the following command:

sudo apt-get update

After successfully updating your system, you will receive the messages shown in the image below:

Step # 2: Install the NIS Server on your Debian 10 System:

Now, we can install the NIS server with the following command:

sudo apt-get –y install nis

Step # 3: Set up the Domain Name for your NIS Server on Debian 10:

During the NIS server’s installation, you will be asked to set up the domain name for it. You can have any name of your choice, or you can either go with the default one and press the Enter key as we did.

After setting up the domain name for your NIS server, you will notice that the installation will finish within a few seconds while displaying the messages shown in the image below on the terminal:

Method of Configuring the NIS Server on Debian 10:

After installing the NIS server on Debian 10, we can now go on with its configuration steps as follows:

Step # 1: Start the “rpcbind” Service on Debian 10:

First, we need to start the “rpcbind” service on Debian 10 with the command shown below:

sudo systemctl start rpcbind

Step # 2: Check the Status of the “rpcbind” Service on Debian 10:

Now, we will check whether the “rpcbind” service has been successfully started or not by running the following command:

sudo systemctl status rpcbind

You can easily see the status of the “rpcbind” service on our Debian 10 system highlighted in the image below:

Step # 3: Start the “ypserv” Service on Debian 10:

After that, we will start the “ypserv” service on Debian 10 with the following command:

sudo systemctl start ypserv

Step # 4: Check the Status of the “ypserv” Service on Debian 10:

Now, we will check whether the “ypserv” service has been successfully started or not by running the command shown below:

sudo systemctl status ypserv

You can easily see the status of the “ypserv” service on our Debian 10 system highlighted in the following image:

Step # 5: Set NIS as the Master Server on Debian 10:

Now we will set the NIS as the master server on Debian 10. For that, we will access the /etc/default/nis file with the command shown below:

sudo nano /etc/default/nis

This file is shown in the following image:

We will then assign the value “master” to the “NISSERVER” variable, as highlighted in the image shown below. After that, we can save and close our file.

Step # 6: Set up the Allowable Access IP Range on Debian 10:

Now, we will set up the IP range to allow access to our NIS server. For that, we will access the /etc/ypserv.securenets file with the following command:

sudo nano /etc/ypserv.securenets

This file is shown in the image below:

Now, we will comment out the line shown in the following image:

Finally, we will add the allowable IP range to the end of this file, as shown in the image below. After that, we can save and close our file.

Step # 7: Add an IP Address for your NIS Server on Debian 10:

Now, we can add any desired IP address for our NIS server. For that, we have to access the /etc/hosts file with the command shown below:

sudo nano /etc/hosts

We need to locate our NIS server’s name in this file and then assign any desired IP address or even go with the default one as highlighted in the following image. After that, we can save and close this file.

Step # 8: Restart the NIS Server on Debian 10:

After making all these configurations, we will restart the NIS server with the following command:

sudo systemctl restart nis

Step # 9: Update the NIS Database on Debian 10:

Finally, we will update the NIS database with the command shown below:

sudo /usr/lib/yp/ypinit –m

At this point, we can add any hosts to this database that will be running the NIS servers. Once you have added the hostnames, you can press Ctrl+D.

After that, you have to enter “y” and then press the Enter key as highlighted in the following image:

Once the NIS database is updated, you will get a confirmation message that the selected system has been set up as a NIS master server, as highlighted in the image shown below:

Method of Removing the NIS Server from Debian 10:

We can also remove the NIS server from our Debian 10 system any time by going through the following two steps:

Step # 1: Remove the NIS Server along with its Configuration Files:

First, we will run the command shown below to remove the NIS server and its configuration files:

sudo apt-get purge nis

Step# 2: Remove all the Additional Packages and Dependencies:

Finally, we will also remove all the unused packages and dependencies with the following command:

sudo apt-get autoremove

Conclusion:

This article focused on the methods of installing and configuring the NIS server on Debian 10. The methods might look lengthy, but it only took us a few minutes to complete these configurations. Finally, we wrapped up this article with the removal method of NIS from Debian 10.

]]>
How to Install Swift in Debian 10 https://linuxhint.com/install-swift-debian/ Sun, 24 Jan 2021 01:23:21 +0000 https://linuxhint.com/?p=87295 Swift is a famous language that was developed by Apple to create software applications. Swift is an open-source language that is used as a fast and interactive programming language to develop various software for all platforms and servers. Writing a Swift code is interactive since the syntax is quite concise. Swift also contains multiple features that are useful for developers. The code written in Swift is safe for designing and extremely fast, as well. This article shows you how to install Swift on a Debian 10 server.

This tutorial will be of great help to all Debian users who wish to install Swift on their computers. We will be using Debian 10, but even if you do not have the latest version of Debian installed on your system, feel free to follow the same procedure on your computer.

Prerequisites

  • Debian 10
  • A sudo user

Installing Swift in Debian 10

To install Swift in Debian, open the terminal using the Ctrl + Alt + T shortcut, then follow the

steps listed below:

Step 1: Updating Packages

To update your packages, run the following command in the terminal window:

$ sudo apt update

The above command will begin to update the packages of your Debian server.

Step 2: Installing Required Dependencies

To install all the dependencies required to install Swift on a Debian 10 server, issue the following command in the terminal window:

$ sudo apt-get install libncurses5 clang libcurl4 libpython2.7 libpython2.7-dev

After some time, the system will prompt you to ask you for permission to continue. Press Y to confirm and then press the Enter key to continue.

Using this method, users can install and update all of the required dependencies on their servers.

Step 3: Installing Swift

The next step is to install Swift on the Debian server. Because there is no pre-defined method for installing Swift on a Debian system, we use the following link to install Swift on our Ubuntu 18.04 system. The latest version available at the time of writing this article is 5.1.3. If there is another version available when you are implementing this method, then feel free to opt for that version by using the following command to get the latest archive version of Swift:

$ wget https://swift.org/builds/swift-5.1.3-release/ubuntu1804/swift-5.1.3-RELEASE/swift-5.1.3-RELEASE-ubuntu18.04.tar.gz

After that, the download will be completed, and an archive file will be saved.

Once the download of the Swift package has been completed, extract this newly downloaded archive file. Execute the following command in the terminal window:

$ tar xzf swift-5.1.3-RELEASE-ubuntu18.04.tar.gz

Next, move this newly extracted folder to the opt directory using the following command:

$ sudo mv swift-5.1.3-RELEASE-ubuntu18.04 /opt/swift/

Step 4: Configuring PATH Environment Variable

You must add the Swift installation path into the PATH environment variable of your system. To do so, issue the following command:

$ echo "export PATH=/opt/swift/usr/bin:$PATH" >> ~/.bashrc

After that, issue the following:

$ source  ~/.bashrc

This marks an end to the process of installing and configuring Swift on the Debian 10 server.

Step 5: Verifying Installation Process

To verify the installation of Swift, issue the following command in the terminal window:

$ swift -version

The output will display the version of Swift installed on your server. This output indicates a successful installation process.

Conclusion

This article showed you a step-by-step method for installing Swift on a Debian 10 server. After installing Swift, you can also verify the installation using the last step in this tutorial.

]]>
How to Install R on Debian 10 https://linuxhint.com/install-r-debian-10/ Wed, 20 Jan 2021 18:06:20 +0000 https://linuxhint.com/?p=86984 R programming language is free and an open-source environment that is specifically used in graphical representation and solving statistical computing problems. R foundation supported this language for statisticians and data mining experts for data analysis and developing statistical applications. R language is most similar to the S language. R language file you can save with extensions (.r, .rdata, .rds, .rda).

This article will give you a complete description of the R programming language installation on the Debian 10 system.

Prerequisites

You should have the following prerequisites for R language installation:

  • Your system should have at least 1G or less than 1GB of RAM.  If you don’t have installed the required RAM, then use a swap file option.
  • Ensure that you must log in as a root user or should have ‘sudo’ privileges.

Open the terminal command line window. To do this, click the top section ‘Activities’ and type the ‘Terminal’ keyword in the search bar. Click on the ‘Terminal’ icon as follows:

R installation on Debian 10

The installation of R is completed into the following different steps, which we are mentioned below in detail:

The R package, which installation from the Debian repository, is usually outdated. Therefore, we will install the latest stable version of R from another repository maintained by CRAN.

Step 1: Install the required packages for adding a repository

Use the following command to install all necessary packages which are required to add a new CRAN repository:

$ sudo apt install dirmngr apt-transport-https ca-certificates software-properties-common gnupg2

Step 2: Enable repository for installation

Execute the below-mentioned command to enable the CRAN repository and import the following CRAN GPG key to your system:

$ sudo apt-key adv --keyserver keys.gnupg.net --recv-key 'E19F5F87128899B192B1A2C2AD5F960A256A04AF'

$ sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/debian buster-cran35/'

Step 3: Update system packages

Update the packages by running the below-mentioned command:

$ sudo apt update

Step 4: R installation

Use the below command on the terminal to install R on your system as follows:

$ sudo apt install r-base

Now, check the R language installation on your Debian 10 system by using the below-given command:

$ R --version

You will notice that the latest stable version of R is printed on the terminal:

Install required R packages from CRAN

You can find a wide range of R packages through the CRAN, which stands for Comprehensive R Archive Network that is the main reason R language is becoming popular day by day.

Install the following package that contains the required tools for compiling or building R packages:

$ sudo apt install build-essential

To install any R package, first, you need to open the R console environment on the terminal by typing the following command with sudo or root privileges:

$ sudo -i R

Now, you can install R packages on your system. Let’s take an example. You want to install the R package ‘Stringr’ for string manipulation. For that purpose, enter the following command in the R console as follows:

> install.packages("stringr")

Installation of the ‘Stringr’ package will complete in a few seconds. After that, you will load the relevant library by using the following command:

> library(string)

Print first Program in R Console

In this program, we will create a character vector with name tutorial as follows:

> tutorial <- c("Install", "R", "on", "Debian", "10")

Now, use the following command to print this on the terminal:

> print(tutorial)

To find the length of the string, type the command as follows:

> str_length(tutorial)

The following vector length will display on the screen:

You can also install more R packages from CRAN by using the following command:

> install.package(package_name)

Conclusion

You have learned how to install R and run R programs on the Debian 10 environment. We have provided in this article how to install R packages by using a simple command from CRAN. You can easily Install any R packages and load its associative library on your system. Now, you can easily install and use R on your Debian system.

]]>
How to Install SysStat to Enable System Monitoring on Debian 10? https://linuxhint.com/install-sysstat-debian-10/ Wed, 20 Jan 2021 10:27:14 +0000 https://linuxhint.com/?p=86906 SysStat is a very useful utility for Linux based systems that are used for effectively monitoring your system. With system monitoring, you can easily figure out all the potential issues in your system, and hence, you can keenly observe the activities going on in your system. In this article, we are going to explain to you the procedure of installing SysStat to enable system monitoring on Debian 10.

Method of Installing SysStat to Enable System Monitoring on Debian 10:

For installing SysStat to enable system monitoring on Debian 10, you have to go through the first five steps listed below, whereas the sixth step represents an example use case of SysStat in Debian 10.

Step # 1: Installing SysStat on Debian 10:

The SysStat utility in Debian 10 can be installed by running the following command:

sudo apt install sysstat

As soon as the SysStat utility is successfully installed on your Debian 10 system, these messages will be displayed on the terminal:

Step # 2: Enabling System Monitoring in the SysStat File in Debian 10:

Now you need to tweak the SysStat file a little to enable system monitoring on Debian 10. This can be done by accessing the SysStat file in the manner shown below:

sudo nano /etc/default/sysstat

The default SysStat file is shown in the following image:

Now we will enable system monitoring in this file by setting the value of the variable “ENABLED” to “true” instead of “false,” as highlighted in the image shown below:

After modifying the SysStat file, we will simply exit the nano editor after saving the file.

Step # 3: Enabling the SysStat Service in Debian 10:

Now we need to re-enable the SysStat service in Debian 10 with the following command:

sudo systemctl enable sysstat

The successful execution of the above-mentioned command will display the messages shown in the image below:

Step # 4: Starting the SysStat Service in Debian 10:

Once the SysStat service is enabled on Debian 10, we need to restart it with the following command:

sudo systemctl start sysstat

The error-free execution of this command will display the messages shown in the image below:

Step # 5: Checking the Status of the SysStat Service in Debian 10:

We can also check the status of the SysStat service in Debian 10 with the following command:

sudo systemctl status sysstat

The status of the sysstat service on our Debian 10 system is shown in the image below:

Step # 6: Viewing the CPU Statistics with SysStat in Debian 10:

By now, the SysStat service will be successfully running on your Debian 10 system. We have shared a sample scenario of viewing the CPU statistics with the SysStat utility in Debian 10 over here. However, the SysStat utility can also be used for viewing other useful system statistics. The CPU statistics can be viewed by running the following command:

sar –u

The CPU statistics of our Debian 10 system are shown in the image below:

Method of Removing SysStat from Debian 10:

Whenever you want to remove the SysStat utility from your Debian 10 system along with all of its dependencies and configuration files, you can run the following command:

sudo apt-get autoremove --purge sysstat

Once all the dependencies and packages that got installed along with the SysStat utility and its configuration files will be removed successfully from your Debian 10 system, you will see these messages on your terminal:

Conclusion:

In this article, we talked about installing the SysStat utility to enable system monitoring on Debian 10. We also shared with you an example scenario of using this utility. Finally, we concluded this article by sharing with you the method of removing this utility from your Debian 10 system.

]]>