• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

ifconfig Command Examples in Linux

by admin

The ifconfig command enables a user to view the current IP addressing information for each NIC recognized by the system. Viewing the IP address configuration is one of the earliest steps in network troubleshooting. The ifconfig command shows the IP address, subnet mask, broadcast ID, MAC address, basic performance information, and NIC name. The tool also enables NICs to be placed in an up or a down configuration (enabled or disabled).

The ifconfig command is officially deprecated in Linux, as noted in the man page; however, it is still available in many current distributions.

Syntax

The syntax of the ifconfig command is:

# ifconfig [options] [interface]

ifconfig Command Examples

1. To see all the interfaces on the system:

# ifconfig -a 

2. To see all the interface stats:

# ifconfig -s
# ifconfig -s eth1 

3. To add the IPv6 address to the interface:

# ifconfig eth1 add 

4. To delete the IPv6 address to the interface:

# ifconfig eth1 add 

5. To create a new SIT device:

# ifconfig eth5 tunnel :: 

6. To set the interrupt line used by the device:

# ifconfig eth1 -irq addr 

7. To set the start address in I/O space for this device:

# ifconfig eth1 io_addr addr 

8. To Set the start address for shared memory used by this device:

# ifconfig eth1 mem_start addr 

9. To Set the physical port or medium type to be used by the device:

# ifconfig eth1 media type 

10. To Set the hardware address of this interface:

# ifconfig eth1 hw class address 

11. To Set the multicast flag on the interface:

# ifconfig eth1 multicast 

12. To set the IP address to the interface:

# ifconfig eth1 address 192.168.27.100 

13. To Set the length of the transmit queue of the device:

# ifconfig eth1 txqueuelen length 

Filed Under: Linux

Some more articles you might also be interested in …

  1. duperemove: command not found
  2. cbt: Utility for reading data from Google Cloud’s Bigtable
  3. swaks Command Examples in Linux
  4. How to Disable/Enable Numa for Virtual Machine (XEN based)
  5. rfkill Command Examples in Linux
  6. alex – A tool that catches insensitive, inconsiderate writing (Command Examples)
  7. ebook-convert: Can be used to convert e-books between common formats, e.g. PDF, EPUB and MOBI
  8. rig: command not found
  9. hardhat Command Examples
  10. laydown Command Examples

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright