Posts

Networking Commands in Linux

ifconfig - Interface Configuration ifconfig command, which is one of the most commonly used tools for managing and configuring network interfaces in Linux. What is ifconfig ? ifconfig stands for interface configuration . It is used to: View and configure the network interfaces (like Ethernet, Wi-Fi, or loopback). Bring interfaces up or down. Assign IP addresses and subnet masks. Troubleshoot network issues. Syntax ifconfig [INTERFACE] [OPTIONS] INTERFACE : The network interface you want to configure or inspect, like eth0 , wlan0 , or lo . OPTIONS : Parameters that control how the interface behaves. How to Use ifconfig -  Examples 1. Display All Network Interfaces      ifconfig      Shows all active network interfaces and their details, including: IP Address ( inet ) Subnet Mask ( netmask ) Broadcast Address ( broadcast ) MAC Address ( ether ) RX/TX Data Statistics 2.Display a Specific Interface      ifconfig eth0      Thi...

Filter commands - wc, grep , head , tail , sort , awk

wc command - word count wc command is used to  count words, lines, characters, or bytes in a file or input. What is the wc Command? wc stands for "word count." It is used to count the number of lines , words , characters , or bytes in files or standard input. The wc command is part of the family of filter commands in Linux, meaning it processes and filters data. Syntax of wc The basic syntax of the wc command is:      wc [OPTION]... [FILE]... Key Points: If you provide a file , wc will analyze it. If you don’t provide a file, wc will work with standard input (text you type or pipe into the command). Basic Usage Let’s start with some examples to understand how wc works: Counting Lines, Words, and Characters in a File           wc example.txt           10   50  300 example.txt This means: 10 : Number of lines in the file. 50 : Number of words in the file. 300 : Number of characters in t...

Linux For Developers

 

Familiarization of basic Linux Commands-useradd, userdel , groupadd, groupdel, passwd

 useradd- adding new users The useradd command in Linux is used to create new user accounts. It is a low-level utility that provides options for configuring user properties such as home directories, shell access, user groups, and more. Syntax useradd [OPTIONS] USERNAME USERNAME : The name of the new user to be created. OPTIONS : Parameters to customize the user account. Features of useradd Creates a New User It adds the user information to the system's user account files, such as /etc/passwd , /etc/shadow , and /etc/group . Configures User Environment By default, it sets up a home directory, user ID (UID), group ID (GID), and a default shell. Options Option Description -c "COMMENT" Sets a description or comment for the user, typically the full name. -d HOME_DIR Specifies the home directory for the user. If not provided, it defaults to /home/USERNAME . -e EXPIRE_DATE Sets an expiration date for the user account (in YYYY-MM-DD format). -f INACTIVE_DAYS Defines the number ...