Open Source Articles

Page 42 of 123

Monitoring Network Usage in Linux

Satish Kumar
Satish Kumar
Updated on 17-Mar-2026 15K+ Views

Network monitoring in Linux involves tracking and analyzing network traffic, bandwidth usage, and connection statistics to ensure optimal system performance. Unlike general system monitoring that focuses on CPU and memory, network monitoring specifically targets data flow across network interfaces and helps identify bottlenecks, suspicious activity, and resource-hungry applications. Network Monitoring Tools Linux provides several powerful command-line tools for network monitoring, each serving different purposes − nload − Displays real-time network traffic statistics with visual graphs for interface monitoring. Speedometer − Shows network usage with customizable display formats and measurement units. iftop − Lists active network connections ...

Read More

Specify an Editor for Crontab on Linux

Satish Kumar
Satish Kumar
Updated on 17-Mar-2026 3K+ Views

The default editor for crontab on Linux is the vi editor. However, this can be changed by setting the VISUAL or EDITOR environment variable to the desired editor before running the crontab command. For example, to use nano as the editor for crontab, the command would be − export VISUAL=nano; crontab -e or export EDITOR=nano; crontab -e This will open the crontab file in nano for editing. Methods to Change Crontab Editor Temporary Change To temporarily change the editor for a single crontab session, set the environment variable inline ...

Read More

Storing a Command in a Variable in a Shell Script

Satish Kumar
Satish Kumar
Updated on 17-Mar-2026 760 Views

In shell scripting, you can store a command in a variable to improve code organization and reusability. This technique allows you to define commands once and execute them multiple times throughout your script. Basic Command Storage The basic syntax for storing a command in a variable is − variable_name="command" For example − current_date="date" list_files="ls -la" To execute the stored command, you need to use command substitution or eval − # Using eval (less secure) eval $current_date # Using command substitution (preferred) $($current_date) Storing Commands in ...

Read More

Running Script or Command as Another User in Linux

Satish Kumar
Satish Kumar
Updated on 17-Mar-2026 30K+ Views

There are several ways to run a script or command as another user in Linux. The most common methods are using the su command (switch user), the sudo command (superuser do), and the runuser command. Each approach has different use cases, security implications, and requirements. These commands are essential for system administration tasks where you need to execute operations with different user privileges without logging out and back in as another user. Using su Command The su command allows you to switch to another user's account. The basic syntax is: su [options] [username] ...

Read More

Running Multi-Line Shell Code at Once From Single Prompt

Satish Kumar
Satish Kumar
Updated on 17-Mar-2026 24K+ Views

Running multi-line shell code at once allows you to execute complex commands and scripts efficiently without typing each line individually. There are several techniques to accomplish this, from creating shell scripts to using command-line operators and here-documents. Shell Script Method The most common approach is creating a shell script file. Use any text editor to write your code and save it with a .sh extension: #!/bin/bash echo "Hello, World!" echo "This is a shell script." Execute the script using: bash script.sh Here-Document (EOF) Method The here-document technique uses the

Read More

Remove Lines Which Appear in File B From Another File A in Linux

Satish Kumar
Satish Kumar
Updated on 17-Mar-2026 7K+ Views

Removing lines from one file that appear in another file is a common task in Linux system administration and data processing. This operation, also known as set difference, can be accomplished using several command-line utilities, each with its own advantages and use cases. Using the grep Command The grep command is the most straightforward approach for this task. It uses pattern matching to filter lines. grep -v -f fileB.txt fileA.txt > outputFile.txt This command uses the -v option to invert the match (show non-matching lines) and -f to specify the file containing patterns to ...

Read More

How to use diff Command in Linux

Pradeep Jhuriya
Pradeep Jhuriya
Updated on 17-Mar-2026 8K+ Views

The diff command in Linux is a powerful command-line utility used to compare the contents of two files or directories line by line and display the differences between them. This tool is essential for developers, system administrators, and anyone working with text files to identify changes, track modifications, and analyze variations in code, configuration files, or documents. Basic File Comparison The most fundamental use of the diff command is comparing two files. The basic syntax is: diff file1 file2 Example Consider two files with slight differences: $ diff file1.txt file2.txt 2c2 ...

Read More

Reset Kali Linux Password

Ajay yadav
Ajay yadav
Updated on 17-Mar-2026 2K+ Views

Kali Linux is a Debian-derived Linux distribution designed for penetration testing and digital forensics, adopted by both hackers and security professionals. Users may find themselves unable to login due to a forgotten password or after installing Kali in a virtual environment or dual boot configuration. This article explains how to reset the Kali Linux password using the built-in recovery options. When locked out of the system, users typically encounter a login prompt where entering incorrect credentials results in access denial. Step-by-Step Password Reset Process Step 1: Access GRUB Boot Menu Reboot your Kali Linux ...

Read More

Difference between Fedora and Red Hat

Mahesh Parahar
Mahesh Parahar
Updated on 17-Mar-2026 1K+ Views

Fedora and Red Hat Enterprise Linux (RHEL) are both Linux-based operating systems from the Red Hat ecosystem. Fedora is the free, community-driven distribution that serves as a testing ground for new technologies, while RHEL is the commercial, enterprise-grade distribution built for production environments. Fedora vs Red Hat Enterprise Linux Fedora • Free & Open Source • 6-month releases • Latest packages • Community support • Testing ground Red Hat (RHEL) • Commercial license ...

Read More

Working with tmux session

sudhir sharma
sudhir sharma
Updated on 17-Mar-2026 483 Views

Tmux is a terminal multiplexer for Unix-based operating systems that enables multiple terminal sessions within a single window. It is particularly valuable when working with cloud-based services like AWS or Azure, allowing users to create separate terminal sessions for different tasks or remote users while maintaining persistent connections. When working with web services, you often need to create an EC2 instance on a web server and establish a session to work remotely. Tmux ensures that your work continues even if your connection drops, as sessions remain active on the server. Getting Started with AWS EC2 Here are ...

Read More
Showing 411–420 of 1,225 articles
« Prev 1 40 41 42 43 44 123 Next »
Advertisements