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 110 of 134
How to Change the Default Home Directory of a User on Linux?
When you create a user on a Linux system, that user is given a default home directory. This home directory is a personal space where the user can store their files and settings. Sometimes it may be necessary to change a user's default home directory on a Linux system. This could be because you want to provide a different location for the user's files or because you want to change the user's name and update the home directory accordingly. Prerequisites Before you get started, there are some prerequisites you should be aware of − You must ...
Read MoreCount lines in a file using Linux bash
Counting lines in a file is a fundamental task in Linux system administration and text processing. Whether you're analyzing log files, processing data, or managing configuration files, knowing how to quickly determine the number of lines helps with file size estimation and data analysis. Linux provides several built-in commands to accomplish this task efficiently. Sample File Setup For demonstration, we'll use a text file called programming.txt containing popular programming languages: $ cat programming.txt JavaScript Java C Python C# PHP C++ Go R Ruby This file contains 10 lines. Let's explore different methods to count ...
Read MoreLinux tar Command
The tar command in Linux is one of the most essential commands for file management and archiving. Short for Tape Archive, it creates and extracts archive files — compressed files containing one or more files bundled together for easier storage, backup, and portability. This guide demonstrates how to create, list, extract, and modify tar archives with practical examples. Syntax The basic syntax of the tar command is − tar [options] [archive-file] [files or directories] Common Options Option Description -cCreate a new archive -xExtract files from archive -fSpecify ...
Read MoreThe traceroute Command in LINUX
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. When a packet is discarded, the router sends back an ICMP "Time ...
Read MoreHow to setup sendmail in ubuntu?
Sendmail is a powerful and reliable mail transfer agent (MTA) that efficiently handles large volumes of email on Linux systems. It works by accepting email messages from local or remote mail clients and relaying them to destination mail servers using the Simple Mail Transfer Protocol (SMTP). This article provides a comprehensive guide on installing and configuring Sendmail on Ubuntu systems, covering everything from basic setup to advanced configuration options. Installing Sendmail on Ubuntu Begin by updating your package list and installing Sendmail using the following commands: sudo apt-get update sudo apt-get install sendmail ...
Read MoreHow to Install and Configure Ansible on CentOS 7
Ansible is an automation configuration management system that can control a large number of client machines with easy administration from a central location. Ansible communicates over SSH tunnels without requiring any software installation on client machines, making it agentless and lightweight. The Ansible configuration files use YAML data format due to its expressiveness and similarity to popular programming languages. Clients can be managed using command-line tools or playbooks for complex automation tasks. Prerequisites CentOS 7 system with root user access SSH keys configured for passwordless authentication Network connectivity between control node and managed hosts ...
Read MoreLinux Commands Comparison curl vs wget
Curl and wget are two essential command-line utilities in Linux for downloading files from the internet. While both serve similar purposes, they have distinct features, capabilities, and use cases. Understanding their differences helps you choose the right tool for your specific needs. Overview of curl and wget Both curl and wget are command-line tools designed to retrieve data from the internet, but they differ in their approach and capabilities. Curl is a versatile data transfer tool that supports numerous protocols including HTTP, HTTPS, FTP, FTPS, SCP, SFTP, and many others. It's designed to handle various data formats ...
Read MoreTop 5 Best Linux Text Editors
A text editor is a program used for creating and modifying plain text files. Linux offers numerous text editors, from simple command-line tools to feature-rich graphical applications. This article explores the top 5 best Linux text editors that cater to different user needs and preferences. Vi/Vim Editor Vim (Vi IMproved) is an enhanced version of the classic Vi editor. It's a powerful, modal text editor that comes pre-installed on most Linux distributions. Vim is exceptionally valuable for editing programs and configuration files due to its extensive feature set and keyboard-driven interface. To open Vi editor, use the ...
Read MoreExecuting C# code in Linux
The .NET ecosystem was traditionally limited to Windows, but Microsoft's introduction of Mono changed this landscape. Mono enables the execution of .NET applications on Linux systems, making them run as if they were native Linux packages rather than Windows executable files. What is Mono? Mono is an open-source, cross-platform implementation of Microsoft's .NET Framework. It allows developers to run .NET applications on various platforms including Linux and macOS. Mono provides a complete development stack that supports Windows Forms, LINQ, XML web services, ADO.NET, and ASP.NET using the same CLR namespaces. Cross-Platform .NET with ...
Read MoreMost Frequently Used Linux IPTables Rules with Examples
This article provides a comprehensive collection of IPTables rules that you can use directly for common networking and security tasks. These examples serve as practical templates for configuring IPTables firewall rules to suit your specific requirements. Deleting IPTables or Existing Rules Before building new IPTables rules, clean up all default and existing rules using the flush command: # iptables --flush # iptables -F Setting Default Chain Policies Change the default policy from ACCEPT to DROP for enhanced security: # iptables -P INPUT DROP # iptables -P FORWARD DROP # iptables -P ...
Read More