• 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. gpasswd: command not found
  2. at Command Examples in Linux
  3. CentOS / RHEL 5 : How to rebuild Initial Ramdisk Image
  4. CentOS / RHEL 6 : How to disable Transparent Huge pages (THP)
  5. How to move /tmp on a separate disk as a separate mount point (Online)
  6. reportbug: command not found
  7. i3: command not found
  8. UNIX / Linux : How to lock or disable an user account
  9. How to Change Default Port of Apache On RHEL/CentOS 7
  10. Linux / UNIX : How to send mails with attachments using mailx command

You May Also Like

Primary Sidebar

Recent Posts

  • ctags: Generates an index (or tag) file of language objects found in source files for many popular programming languages
  • csvtool: Utility to filter and extract data from CSV formatted sources
  • csvstat: Print descriptive statistics for all columns in a CSV file
  • csvsql: Generate SQL statements for a CSV file or execute those statements directly on a database

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright