• 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

iwconfig Command Examples in Linux

by admin

The iwconfig command is used to provide wireless NIC configurations, including settings like SSID, encryption information, etc. To connect to a wired network, we simply assign an IP address and subnet mask with the ifconfig utility. A wireless network connection requires the iwconfig and iwlist utilities.

Syntax

The syntax of the iwconfig command is:

# iwconfig [options] [interface]

iwconfig Command Options

The following table describes some common iwconfig command options:

Option Used To
nick {name} Set a nickname for the NIC.
mode {mode} Set the operating mode for the NIC that corresponds to the network topology.
freq {number} Set the Wi-Fi frequency used by the NIC
channel {number} Set the Wi-Fi channel used by the NIC.
retry {number} Set the maximum number of MAC retransmissions for the NIC.

iwconfig Command Examples

1. Show the parameters and statistics of all the interfaces:

# iwconfig

2. Show the parameters and statistics of the specified interface:

# iwconfig interface

3. Set the ESSID (network name) of the specified interface (e.g. eth0 or wlp2s0):

# iwconfig interface new_network_name

4. Set the operating mode of the specified interface:

# iwconfig interface mode ad hoc|Managed|Master|Repeater|Secondary|Monitor|Auto

5. To configure Eth1 to operate in monitor mode, type this:

# iwconfig eth1 mode monitor

Filed Under: Linux

Some more articles you might also be interested in …

  1. CentOS / RHEL 6 : How to Change the Volume Group Name for Root Disk Device
  2. How to Disable “alt+ctrl+Del” Key Combination causing reboot in CentOS/RHEL 4,5
  3. mpstat: command not found
  4. arpspoof: command not found
  5. CentOS / RHEL : How to log all LVM commands
  6. How To Check a Disk for Bad Blocks or Disk Errors on CentOS / RHEL
  7. lshal Command Examples in Linux
  8. The /var/log/messages is empty, and so are the rotated log files such as messages.0, messages.1
  9. How to Schedule Tasks Using at in Linux
  10. cockpit-ws Command Examples in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • nixos-rebuild Command Examples in Linux
  • nixos-option: Command Examples in Linux
  • nixos-container : Command Examples in Linux
  • nitrogen Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright