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

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • 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. fdisk: Unable to write /dev/sdg: Bad file descriptor – error while formatting USB disk
  2. “BAD PASSWD : is too simple” – error during password change in CentOS/RHEL 7 and 8
  3. How to Remove a Dead Mulitpath Device without Reboot in CentOS/RHEL
  4. How to Change or Rename a Mount Point in Linux
  5. How to modify the iSCSI initiator ID in Linux
  6. RCRON – Setup High Availability of cron Jobs
  7. Downgrading an rpm package to a lower version (using “rpm” command)
  8. How to disable IPv6 on CentOS / RHEL 5
  9. How to List and Set SELinux Context for MySQL Server
  10. CentOS / RHEL 5,6 : How to Change the timezone

You May Also Like

Primary Sidebar

Recent Posts

  • JavaFX ComboBox: Set a value to the combo box
  • Nginx load balancing
  • nginx 504 gateway time-out
  • Images preview with ngx_http_image_filter_module

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright