Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Linux Articles
Page 35 of 134
Configure sendmail with Gmail on Ubuntu
Sendmail is a popular mail transfer agent used to send emails from one computer to another. It is often installed by default on Ubuntu, making it a convenient option for sending emails from a server. If you use Gmail, you can configure sendmail to send emails through your Gmail account. In this article, we will show you the process of configuring sendmail with Gmail on Ubuntu. Requirements Before starting, there are a few requirements needed to configure sendmail with Gmail on Ubuntu − A Gmail account An Ubuntu server Sendmail installed on your Ubuntu server ...
Read MoreDelete expoted environment Variable in Linux shell
This article explains how to delete an exported environment variable from the Linux shell. Environment variables are key-value pairs that store system and user configuration information accessible to all processes running in the system. Understanding Environment Variables An environment variable is a named storage location that contains data used by the operating system and applications. When a variable is exported, it becomes available to child processes spawned from the current shell. These variables are stored in the process's memory space and can be accessed programmatically using functions like getenv() in C. Listing Exported Variables Before deleting ...
Read MoreUnderstanding Stale file handles in Linux
In this article, we will discuss the concept of stale file handles in Linux and how to understand and resolve them. We'll explore the relationship between file handles, inodes, and the filesystem to understand why stale file handles occur and how to fix them. The examples in this tutorial have been tested on Debian 10.10 (Buster) with GNU Bash 5.0.3. The concepts are POSIX-compliant and apply to most Unix-like systems. What are File Handles? A file handle (or file descriptor) is an integer value that represents a reference to an open file. The operating system maintains a ...
Read MoreCheck if Hard Drive is SSD or HDD on Linux
To determine whether our file system uses SSD or HDD technology, we need to identify which type of storage device is used by our Linux system. Understanding storage hardware helps optimize performance and make informed decisions about data placement. There are many different aspects of Linux storage with numerous tools available for reading and configuring storage devices. We use terms like "drive", "volume", and "mount point" to describe hard drives, optical discs, and USB sticks. To understand the underlying technology, we focus on two key aspects − What physical disk or block device we are examining (using ...
Read MoreFind the Java SDK location on Linux
Finding the Java SDK location on Linux is a common task for developers who need to configure environment variables, set up IDEs, or manage multiple Java versions. This article demonstrates several reliable methods to locate your Java Development Kit (JDK) installation directory using built-in Linux commands. Understanding Java Installations on Linux On Linux systems, Java can be installed in various locations depending on the installation method and distribution. Common locations include /usr/lib/jvm/, /usr/java/, or /opt/java/. Additionally, many systems support multiple Java versions simultaneously, making it important to identify which version is currently active. Method 1: Using update-java-alternatives ...
Read MoreCount occurrences of a char in a text file
We'll learn how to use Linux commands to count occurrences of a specific character in a text file. This tutorial covers three different approaches using grep, tr, and awk commands, along with their performance characteristics. We're assuming familiarity with common Linux commands including grep, awk, and tr. For demonstration, we'll use a sample file tpoint.txt containing: $ cat tpoint.txt "I Love Tpoint!!!" "Tpoint is great!!!" Using the grep Command The grep command searches for specific patterns in text files. To count character occurrences, we use the -o option to output each match on a ...
Read MoreELK Stack Tutorial: Get Started with Elasticsearch, Logstash, Kibana, & Beats
The ELK Stack is a powerful collection of open-source tools for searching, analyzing, and visualizing log data in real time. Originally consisting of Elasticsearch, Logstash, and Kibana, the stack has evolved to include Beats, forming what's now called the Elastic Stack. This comprehensive solution enables organizations to centralize logging, monitor systems, and gain insights from massive datasets across healthcare, finance, IT, and other industries. Components of ELK Stack ELK Stack Architecture Beats (Data Shippers) Logstash (Processing) ...
Read MoreFind all links for a specific file on Linux
In Linux, finding all links for a specific file is a common administrative task. A link in Unix/Linux systems is an association between two different files or directories. When you create a link, it creates a new name for the original file. There are two types of links: hard links (multiple names for the same inode) and symbolic links (shortcuts that point to another file path). Setup Example Let's start with a practical example. We have a file1.txt document and several symbolic links pointing to it from different locations: [tpoint@server1:~/test]$ ls -lrth total 12K -rw-r--r-- 1 tpoint ...
Read MoreCreate bash alias that accepts parameters
When working with Bash scripts or Unix/Linux command line tools, we often write the same command lines over and over again. Often, these command lines are long and must be repeated multiple times. For instance, when logging into a remote server daily, copying a local folder to the remote server, or searching for hidden files or directories within a directory. You can create aliases using the alias command. In this guide, I will show you how to create an alias that accepts parameters on Linux. This is useful if you want to run a single command repeatedly without having ...
Read MoreCommand chaining: Inline or Already running process
Command chaining allows you to run multiple commands sequentially in Linux. This is useful when you need to execute a series of related operations, such as downloading a file, extracting it, and then cleaning up. Command chaining can be done inline when starting commands or applied to processes that are already running. Inline Command Chaining Bash provides several operators for chaining commands together. The general syntax is: ... Common Chaining Operators ; (semicolon) − Executes commands sequentially regardless of success or failure & (ampersand) − Runs the ...
Read More