0
0
Linux CLIscripting~10 mins

ifconfig and ip addr in Linux CLI - Step-by-Step Execution

Choose your learning style9 modes available
Concept Flow - ifconfig and ip addr
Start
Run ifconfig
Display network interfaces and details
Run ip addr
Display network interfaces with IP info
Compare outputs
End
The flow shows running 'ifconfig' and 'ip addr' commands to display network interface details and IP addresses, then comparing their outputs.
Execution Sample
Linux CLI
ifconfig
ip addr
Runs 'ifconfig' and 'ip addr' commands to show network interfaces and their IP addresses.
Execution Table
StepCommandActionOutput Summary
1ifconfigRuns ifconfig to list interfacesShows interfaces with IP, MAC, RX/TX stats
2ip addrRuns ip addr to list interfacesShows interfaces with IP addresses and states
3CompareLook at differencesip addr shows more detailed info and modern format
4ExitCommands finishedNo more output
💡 Both commands finish after displaying network interface information.
Variable Tracker
VariableStartAfter ifconfigAfter ip addrFinal
interfaces_listemptylist of interfaces with IP and MAClist of interfaces with IP, MAC, statefinal detailed interface info
Key Moments - 2 Insights
Why does 'ip addr' show more details than 'ifconfig'?
'ip addr' is a newer tool that shows more info like interface state and supports modern Linux networking features, as seen in execution_table step 2.
Are 'ifconfig' and 'ip addr' interchangeable?
'ifconfig' is older and may not be installed by default; 'ip addr' is recommended for modern systems, shown by their different outputs in execution_table steps 1 and 2.
Visual Quiz - 3 Questions
Test your understanding
Look at the execution table, what does the 'ifconfig' command output mainly show?
ANetwork interfaces with IP, MAC, and RX/TX stats
BOnly IP addresses
CRouting table
DFirewall rules
💡 Hint
See execution_table row 1 under Output Summary
At which step does the output show interface states like UP or DOWN?
AStep 1
BStep 3
CStep 2
DStep 4
💡 Hint
Check execution_table row 2 Action and Output Summary
If 'ifconfig' is not installed, which command should you use to see IP addresses?
Aping
Bip addr
Cnetstat
Dtraceroute
💡 Hint
Refer to key_moments about modern tool recommendation
Concept Snapshot
ifconfig and ip addr show network interfaces.
ifconfig is older, shows IP, MAC, RX/TX stats.
ip addr is newer, shows IP, MAC, interface state.
Use ip addr on modern Linux systems.
Both commands display interface info but differ in detail.
Full Transcript
This lesson shows how to use 'ifconfig' and 'ip addr' commands in Linux to view network interfaces and their IP addresses. First, running 'ifconfig' lists interfaces with IP addresses, MAC addresses, and data statistics. Then, running 'ip addr' shows interfaces with IP addresses and their states like UP or DOWN. 'ip addr' is a newer tool with more detailed output and is recommended on modern systems. The execution table traces these steps and outputs. Key moments clarify why 'ip addr' shows more info and when to use each command. The visual quiz tests understanding of command outputs and usage. The concept snapshot summarizes the main points for quick reference.