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
Articles by Kunal Verma
19 articles
Use sudo Command in Non-Interactive Mode
In Linux, the sudo (Super User DO) command is frequently used as a prefix to a command that only superusers are permitted to execute. Any command that has the "sudo" prefix will run with elevated privileges, or in other words, allow a user with the necessary permissions to execute a command in the role of another user, such as the superuser. This is comparable to Windows' "run as administrator" option. Note − Linux commands are case-sensitive. Default sudo Behavior To use the sudo command on the majority of contemporary Linux distributions, a user must be a member ...
Read MoreHow to List the Last Five Modified Files in Linux?
In Linux, it is often necessary to find out the most recently modified files for various reasons, such as troubleshooting or auditing purposes. Listing the last five modified files is a common requirement that can be achieved using various Linux commands. This article explores multiple methods to accomplish this task efficiently. Note − Linux commands are case-sensitive. Using ls Command The ls command is one of the most commonly used commands in Linux to list files and directories. We can use the ls command to list the files in a directory sorted by modification time using the ...
Read MoreHow to Monitor Disk IO in a Linux System
Disk monitoring is a critical task for maintaining optimal performance in Linux systems. The disk I/O subsystem is often the slowest component and can become a bottleneck that affects overall system performance. When processes wait for I/O operations to complete, it directly impacts system responsiveness. Effective disk monitoring helps identify which processes are causing I/O bottlenecks and determines the root cause of performance issues. In this article, we'll explore essential tools like iostat and iotop to monitor disk I/O performance in Linux systems. Installing iotop The iotop tool is available in most Linux distribution repositories and can ...
Read MoreHow Are Linux PIDs Generated?
When a Linux command is executed, the system creates a separate process to carry out that command. Each process is assigned a unique Process ID (PID), which the operating system uses to track and manage the process throughout its lifecycle. Note − Linux commands are case-sensitive. Process Table The process table is a data structure stored in the system's RAM that contains information about all processes currently managed by the operating system. Each entry in the process table stores comprehensive details about a specific process. Key information stored in the process table includes − ...
Read MoreWorking and components of Linux GUI with Examples
The Graphical User Interface (GUI) is a visual interface that allows users to interact with a Linux system through windows, icons, menus, and pointing devices rather than text-based commands. Unlike command-line interfaces, GUI provides an intuitive way to operate the system using graphical elements that represent files, applications, and system functions. How Linux GUI Works Linux GUI operates through a layered architecture where the X Window System (X11) serves as the foundation layer, managing graphics rendering and input/output operations. Above this sits the window manager, which controls window placement, decoration, and behavior. The desktop environment provides the complete ...
Read MoreEscaping Characters in Bash on Linux
Character escaping in Bash is a fundamental concept that allows you to control how special characters are interpreted by the shell. Since many characters have special meanings in Bash (like $, &, *), escaping lets you use their literal values when needed. This tutorial covers the different string types in Bash and demonstrates various methods for escaping characters to preserve their literal meaning. String Types in Bash Bash handles strings differently based on how they are quoted. Understanding these differences is crucial for proper character escaping. Single Quotes Single quotes (') preserve the literal value ...
Read MoreFind the Process That is Using a File in Linux
When working with files in Linux, you may encounter situations where you cannot unmount a filesystem or access a file because it shows as "busy". This occurs when a process is actively using the file, keeping it open for reading or writing. To resolve this, you need to identify which process is using the file. This tutorial covers the essential commands to find processes that are using specific files in Linux systems. Note − Linux commands are case-sensitive. Commands to Find the Process Linux provides several commands to identify processes working with files. These commands gather ...
Read MoreFixing the "Too many open files" Error in Linux
On Linux servers under heavy load, the "too many open files" error occurs frequently. This error indicates that a process cannot open new files (file descriptors) because it has reached the system-imposed limit. Linux sets a default maximum open file limit for each process and user, and these default settings are often modest for production workloads. The number of concurrent file descriptors that users and processes can open is constrained by system limits. When a user or process attempts to open more file descriptors than allowed, the "Too many open files" error appears. The solution involves increasing the maximum ...
Read MoreHow to Set Wget Connection Timeout in Linux?
Wget is a free GNU command-line utility for downloading files from web servers using HTTP, HTTPS, and FTP protocols. When downloading files over unreliable network connections, you may encounter timeouts that cause downloads to fail. Linux provides several wget timeout options to handle these situations effectively. Installing Wget in Linux Most modern Linux distributions come with wget pre-installed. To check if wget is available, open your terminal and type wget. If installed, you'll see "wget: missing URL". If not installed, you'll see "command not found". Ubuntu and Debian sudo apt install wget CentOS ...
Read MoreHow to Show the wget Progress Bar Only in Linux?
Remote management of UNIX/Linux/BSD servers via SSH session is a common practice. For installation, you might need to download software or other files. While Linux has several graphical download managers, the wget command-line tool is preferred for non-interactive downloads. The wget command supports various Internet protocols including HTTP, HTTPS, and FTP. Basic Wget Usage The simplest use of wget is downloading a single file to your current directory. Type wget followed by the file URL − $ wget https://www.tutorialspoint.com/index.htm --2022-12-26 10:18:13-- https://www.tutorialspoint.com/index.htm Resolving www.tutorialspoint.com (www.tutorialspoint.com)... 192.229.221.69 Connecting to www.tutorialspoint.com (www.tutorialspoint.com)|192.229.221.69|:443... connected. HTTP ...
Read More