Tutorials on Linux, Programming & Technology

How to Upgrade PIP in Windows

How to Upgrade PIP in Windows?

To upgrade the pip or install the latest version of pip in windows, the “python -m pip install –upgrade pip” command is used in Python.

How to Create a .crt File in Linux?

Linux offers the built-in “OpenSSL” library to create the “.crt” file that establishes a secure connection between a server and a web browser.

View the Content of a Tar File

How to View the Content of a Tar File?

Linux offers the “tar” command with the “tvf” option to view the contents of a tar file. It displays the “file names”, “date and time”, and “file location”.

How to Use the lsusb Command in Linux

How to Use the lsusb Command in Linux?

Linux offers the “lsusb” command to display a list of all USB devices connected to the system, including the device’s vendor ID, product ID, and device class.

How to Set User Agent in curl

How to Set User Agent in curl?

Linux offers the “curl -A” option, the “.curlrc” file, and the “CURL_USER_AGENT” environment variable to set the user agent.

How to Install GNOME on Ubuntu

How to Install GNOME on Ubuntu?

To install the GNOME desktop environment and minimal version, run the “ubuntu-gnome-desktop” and “ubuntu-desktop-minimal” commands in the system.

5 quick ways to kill a process in Linux

5 Quick Ways to Kill a Process in Linux

To kill a process in Linux, the “kill”, “kilall”, “pkill”, “xkill” and “top” commands are used.
They require the process name or id to kill the process.

Install MySQL on CentOS 7

How to Install MySQL on CentOS 7?

To install MySQL on CentOS 7, the “mysql-server” package is required after enabling the repository of MySQL 8.0. It installs all dependencies in the system.

What is a Boot Loader

What is a Boot Loader?

The boot loader loads the OS into memory and starts it. It is responsible for initializing the system, performing hardware tests, and giving control to the OS.

Days to a Date in Python

How to Add Days to a Date in Python?

To add days to date, the “timedelta()” class of the “datetime” module and “pd.Dateoffset()” function of the panda’s module are used in Python.

Print Object's Attributes in Python

How to Print Object Attributes in Python?

To print an object’s attributes, different methods are used in Python, such as the “dir()” function, “vars()” function, and “inspect.getmembers()” function.

Python Callback Function

Python Callback Function | Explained

A “callback function” is a defined function that is passed as a parameter value to another function. It is called at a specific point in the main function.

String Builder Equivalent in Python

String Builder Equivalent in Python

To create the string builder equivalent, the “join()” function, the “+=” operator, string concatenation, and the IO module are used in Python.

Modulo-Operator(%) in Python

Modulo-Operator(%) in Python

In Python, the Modulo operator “%” divides the two numbers and retrieves the remainder as output. It is also used for string formatting.

How to Sort a Set in Python

How to Sort a Set in Python?

To sort a set, the “sorted()” and the “list.sort()” functions are used in Python. These functions sort the set elements and retrieve them as a list.

How to Overwrite a File in Python

How to Overwrite a File in Python?

To overwrite a file in Python, the “open()” method, “seek() and truncate()”, “re.sub()”, “os.remove()”, “replace()”, and “fileinput()” methods are used.

Cosine Similarity in Python

Cosine Similarity in Python

To calculate the cosine similarity, the functions of the “Numpy”, “scipy”, and the “scikit-learn” module are used in Python.

Inverse of Matrix in Python

To find the inverse of the matrix, the “numpy.linalg.inv()” function, “numpy.matrix” class, and the “scipy.linalg.inv()” function is used in Python.

How to Convert Float to String in Python

How to Convert Float to String in Python?

To convert float to string, the “str()” function, “f-string” method, “repr()”, and “format()” functions, Numpy, and List Comprehension, are used in Python.

Convert Hex String to Int in Python

Convert Hex String to Int in Python

To convert hex string to integer, the built-in “int()” function and the “ast.literal_eval()” function of the “ast” module is used in Python.

How to unban an IP in fail2ban

How to unban an IP in fail2ban?

To unban an IP in fail2ban, the “fail2ban-client” utility is used by specifying the banned IP Address in IP List. This utility prevents unauthorized activity.

How to Show MOTD in Linux

How to Show MOTD in Linux?

Linux offers the “cat” command to display the “MOTD” in the terminal. Also, users can display the custom MOTD after accessing the /etc/motd file.