Found 1436 Articles for Linux

How to Change Terminal Output Color in Linux?

Pradeep Jhuriya
Updated on 13-Feb-2023 17:12:32

20K+ Views

Introduction The Linux Terminal is a powerful tool that allows users to interact with the operating system through the command line. However, the terminal's default output color can be dull and unattractive. In this article, we will discuss several ways to change the terminal output color in Linux. We'll cover the use of different commands and tools that can be used to customize the terminal's color scheme, as well as some examples of how to use them. This guide is intended for Linux users who want to improve their terminal experience by changing the output color. Using the "LS" command ... Read More

The traceroute Command in LINUX

Pradeep Jhuriya
Updated on 26-Feb-2024 11:10:38

4K+ Views

Introduction The “traceroute” command is a network diagnostic tool that allows users to track the route that a packet takes from the source computer to the destination. This tool is widely used by network administrators and engineers to troubleshoot network issues such as high latency, packet loss, and connectivity problems. Traceroute works by sending packets with gradually increasing Time-To-Live (TTL) values to the destination. As each packet reaches a router, the router decrements the TTL value by 1 and discards the packet if the TTL value becomes zero. The traceroute command listens for error messages sent back by the routers ... Read More

Shutdown and Reboot Linux Systems From the Terminal

Pradeep Jhuriya
Updated on 13-Feb-2023 17:09:07

586 Views

Introduction In this article, we will discuss how to shut down and restart Linux systems from the terminal. The ability to shut down and restart a system from the command line can be useful in a variety of situations, such as when the GUI is unavailable or when automating tasks via Linux shell scripts. Overview Linux is a fairly robust operating system, and as such, rebooting Linux servers is rarely necessary. However, sometimes there are reasons why you need to restart your system. For example, if we are running Linux on our personal computer, restarting and shutting down the system ... Read More

ARP Commands

Satish Kumar
Updated on 31-Jan-2023 09:20:26

13K+ Views

ARP (Address Resolution Protocol) is a networking protocol that is used to map a network address, such as an IP address, to a physical (MAC) address. It is a fundamental building block of the Internet Protocol (IP) and is used to allow devices to communicate with each other on a network. In this article, we will discuss the various ARP commands and their usage, with examples to help you better understand the concept. ARP Command: arp The arp command is used to display or modify the ARP cache on a computer. The ARP cache is a table that stores the ... Read More

Evaluate XPath in the Linux Command Line

Satish Kumar
Updated on 27-Jan-2023 12:53:04

2K+ Views

Introduction XPath is a powerful language used for navigating and selecting elements within an XML document. It is commonly used in conjunction with XSLT, a language used for transforming XML documents, to extract specific information from a document. In this article, we will discuss how to evaluate XPath expressions in the Linux command line, using the command-line tool xmllint. Installing xmllint Before we can begin evaluating XPath expressions in the Linux command line, we must first install xmllint. xmllint is part of the libxml2 library, which is included in most Linux distributions. To check if xmllint is already installed on ... Read More

Move All Files Including Hidden Files Into Parent Directory in Linux

Pradeep Jhuriya
Updated on 25-Jan-2023 10:41:57

7K+ Views

Introduction In Linux, hidden files, also known as dotfiles, are files whose names begin with a dot (.) character. These files are often used to store configuration data or other important information that should not be changed or deleted by the user. If you have a directory with a large number of hidden files and you want to move them all to the root directory, there are several ways to do this. In this tutorial, we will discuss two methods for moving all files, including hidden files, from a directory to its home directory in Linux: the mv command and ... Read More

Run Cron Job Only If It Isn’t Already Running in Linux

Pradeep Jhuriya
Updated on 25-Jan-2023 10:40:53

2K+ Views

Introduction Cron is a utility in Linux that allows users to schedule commands or scripts to run automatically at a specific date and time. However, sometimes it may be necessary to ensure that a cron job does not run more than once at a time. In this article, we will discuss two ways to prevent overlapping cron tasks: using process tracking and using a “.pid” file. Locate running instances by process One way to avoid overlapping a cron task run is to check for the presence of the task's process before running it. This can be done using the pgrep ... Read More

Find the Current Working Directory of a Running Process in Linux

Pradeep Jhuriya
Updated on 25-Jan-2023 10:38:29

5K+ Views

Introduction One of the basic tasks when working with processes on a Linux system is determining the current working directory of a process. The current working directory, also known as the "current directory" or "current working folder, " is the directory in which a process runs and interacts with files. Knowing the current working directory of a process can be useful for a variety of purposes, such as debugging, understanding the environment in which a process is running, or simply monitoring the activity of a process. In this article, we will discuss how to find the current working directory of ... Read More

Remove the Last N Lines of a File in Linux

Pradeep Jhuriya
Updated on 25-Jan-2023 10:37:16

8K+ Views

Introduction There may be times when you need to remove the last few lines of a file on Linux. For example, you may have a log file that is constantly being added and you want to keep only the most recent entries. In this tutorial, we'll explore a few different methods to remove the last N lines of a file on Linux. Use the head and tail commands The head and tail commands are two very useful utilities for displaying the beginning and end of a file, respectively. By combining these commands, we can easily remove the last N lines ... Read More

Extracting a WAR File in Linux

Pradeep Jhuriya
Updated on 25-Jan-2023 10:33:04

9K+ Views

Introduction WAR (Web ARchive) files are a type of archive file used to package web applications into a single file. They are similar to Java ARchive (JAR) files and are typically used to deploy web applications in a Java environment. In this article, we will learn how to extract a WAR file on Linux using the command line. A WAR file is essentially a ZIP file that contains all the files needed for a web application, including HTML, CSS, JavaScript, and Java files. Checking out a WAR file allows you to access the individual files it contains and make changes ... Read More

Advertisements