home  wiki

Spelling: LinuxCommandHowTo



* What is it? [1]
* CLI [2]

* Self Help [3]

* man [4]
* apropos [5]
* info [6]
* -h --help [7]

* Networking Commands [8]

* pcmcia_cs (card--- commands) [9]
* ifup, ifdown [10]
* ifconfig [11]
* wireless-tools (iw--- commands) [12]
* ip [13]
* route [14]

* System Commands [15]

* dmesg [16]
* ps [17]
* mod-utils [18]

* Other Commands [19]
* Terminal Shortcuts [20]

* [21]
* [22]
* [23]

* Installing or Building packages [24]

* apt [25]
* emerge [26]

* Misc - but still important [27]

* enable forwarding [28]
* /proc [29]
* redirection [30]
* /var/log [31]

* GUI [32]

WHAT IS IT?

Wireless related commands for the beginner (or the forgetful).

This is not a complete list and is not intended as a subsitute for
the manual (MAN MAN) nor the time tested method of experimentation.
It is instead, a list of useful command line entries (or
observations) that will help to kickstart the puzzled newbie into
using wireless on Linux [33] effectively.
It concentrates on the CLI as that's the base most of the GUI's work
from, it's also ALWAYS THERE.

If you're after more then the Rute User\'s Tutorial and Exposition
[34] is one of many resources for an introduction to Linux [35].

Feel free to add to it...

CLI

Command Line Interface - Which means you're sitting at a terminal (of
some sort) and entering text strings at the prompt. You may be
physically at the computer or remotely accessing it via SSH [36] or a
serial console [37].

SELF HELP

MAN

* MAN - help pages for any command/appliciation. Also has help pages
for some related configuration files too.
* MAN MAN - review what the man help system does

APROPOS

* APROPOS - search the manual descriptions for

* APROPOS ROUTE - return manuals that consider route to be in their
"domain"

INFO

* INFO - review what the info help system does
* PINFO - a "colorful viewer"

-H --HELP

help switches, add either the short format -H or the long format
--HELP after a command to get help on it.

NETWORKING COMMANDS

PCMCIA_CS (CARD--- COMMANDS)

PCMCIA Card Services - generally starts on system boot up or may be
manually started using _/etc/init.d/pcmcia_ and displayed arguments
(RedHat, Fedora, Debian and others)
If it's not running on start up the CHKCONFIG or SETUP can be used
under RedHat [38], Fedora to check the start configuration. (What is
it under Debian [39]?)

* CARDCTL EJECT -- ejects all cards

* CARDCTL EJECT 0 - ejects first card
* CARDCTL EJECT 1 - ejects secondcard

* CARDCTL IDENT - IDENTify a card. Useful when changing the default
driver, by editing _/etc/pcmcia/config, /etc/pcmcia/config-2.4 or
/etc/pcmcia/host_cs.conf_ and changing the module the MANFID BINDs to.


If problems are experienced in ejecting a card, the interface may
need to be brought down first. Programs such as DHCLIENT may be
blocking the card and preventing a clean exit.

IFUP, IFDOWN

* IFDOWN WLAN0 - shutdown the wlan0 interface
* IFUP WLAN0 - start the wlan0 interface
* also see IFCONFIG

IFCONFIG

* IFCONFIG - return configuration of ethernet devices

* IFCONFIG ETH0 - eth0 values only

* IFCONFIG ETH0 UP - start the eth0 interface
* IFCONFIG ETH0 DOWN - shutdown the eth0 interface

WIRELESS-TOOLS (IW--- COMMANDS)

* IWCONFIG - displays all interfaces (the IFCONFIG of wireless cards)

* IWCONFIG WLAN1 - displays wlan1 only
* IWCONFIG TXPOWER - for cards that support, changes transmit
power (NB: If using mW, don't forget the suffix)

* IWLIST SCAN -- scans from all supported cards and reports stats on
accesspoints or clients found

* IWLIST WLAN0 SCAN - scans for nodes (only from wlan0)

* IWPRIV WLAN0 HOSTSCAN # - then issue dmesg to check results - it
peforms a quick scan of wireless nodes

* 1 = send Probe Request at 1 Mbps
* 2 = send Probe Request at 2 Mbps
* 3 = send Probe Request at 5.5 Mbps
* 4 = send Probe Request at 11 Mbps

To perform MAC filtering (deny), use the following two commands:

* IWPRIV WLAN1 MACCMD 2 - implement a deny policy (see the README in
the Hostap tarball)

* IWPRIV WLAN1 ADDMAC 00:00:C8:2F:AE:53 - to exclude a specific MAC
address. Then use the following to verify the above input (if using
hostap)
* CAT /PROC/NET/HOSTAP/WLAN1/AP_CONTROL - which should return...

* MAC policy: deny
* MAC entries:1
* MAC list:
* 00:00:c8:2f:ae:53

IP

supplied by the iproute or iproute2 package. A (minimum) 2.2 kernel
is usually required and the package may need to be manually installed.

* There is no manual page, use IP HELP instead
* IP A display address's

* IP A HELP - further help for address's

* IP R display routes (also review the ROUTE COMMAND)

* IP R HELP further route help

* IP A A 10.10.146.58/30 DEV ETH0 LABEL ETH0:0 - add a virtual
interface to dev eth0
* IP L S ETH0 MTU 1200 - change the mtu to 1200

ROUTE

* ROUTE -N - display routes without resolving names (no names =
quicker)

SYSTEM COMMANDS

DMESG

display the kernel messages. Useful immediately after boot up or at
any time that the OS messages may need reviewing. ie: You have
(computer based) problems

PS

show running processes
options - too many to list - review the manual.

* PS -ADELF - a fairly complete long listing. Needs wordwrap to
review effectively . Try redirecting
* PS AXF - a threaded listing

MOD-UTILS

Commands centred around modules (drivers). Not usually needed except
when first installing a card, that is not automatically detected.

* LSMOD list running modules
* INSMOD NE2K-PCI - load the module ne2k-pci (realtek cards)

If errors are reported back about missing dependencies then look in
_/lib/modules//modules.dep_, find the module you're trying to load and
see what else is mentioned on that line, in this case it's 8390. Load
8390 first then load ne2k-pci and all should be okay.

* DEPMOD - register modules into the database DEPMOD -AE - as above
but list complaints

* DEPMOD -H - HELP - (and where this small list ends

OTHER COMMANDS

TERMINAL SHORTCUTS

F1, F2 etc will change consoles. Usually up to 7 consoles are
preconfigured, the number can be changed in _/etc/inittab_. Reduce the
number for a headless, low memory machine.

Use scroll back on current console. The scroll back on the current
terminal (console) will be lost when changing to another console.
Unsurprisingly has a similar effect

Enter the start of a command at the prompt then use to complete the
typing. If more than one result would be possible then to list them
all.

INSTALLING OR BUILDING PACKAGES

APT

* APT-GET INSTALL - a VERY easy to use package installer/uninstaller
originally for Debian [40]. Simply type the command and the name of
the application (package) you want and APT will download it, install
it and configure it for you. Apt is available for some rpm
distributions as an add on package, YUM is an equivalent now installed
by default in Fedora [41].
* APT-CACHE SEARCH - a quick way to find and list packages with
short descriptions for Debian [42]. Try something like APT-CACHE
SEARCH WIRELESS and see what you get.
* APT-CACHE SHOW - show the version, size, full description and so
forth for a package.

EMERGE

* EMERGE - a VERY easy to use application installer/uninstaller found
in Gentoo [43]. Simply type the command and the name of the
application (package) you want and PORTAGE will download it, COMPILE
it, install it and configure it for you. Edit /etc/make.conf to setup
exactly how you want your applications compiled.

MISC - BUT STILL IMPORTANT

ENABLE FORWARDING

Routers must have this set, firewalls will often set it within their
scripts.
The scripts or whatever will all write either 0 (false) or 1 (true)
to _/proc/sys/net/ipv4/ip_forward_.
Read it using...

* CAT /PROC/SYS/NET/IPV4/IP_FORWARD

Write to it (and enable forwarding) with...

* ECHO 1 > /PROC/SYS/NET/IPV4/IP_FORWARD and check with the previous
CAT command

/PROC

Directory of running processess and their configuration variables.
When you edit a config file and run the application, this is where
those changes are stored (close enough?)

* CAT /PROC/INTERRUPTS - show irq's in use (and thus check, resolve
clashes)
* CAT /PROC/PCI - show results found for pci bus (slots). ie:
detected values for pci cards such as ethernet, video, cradles
* CAT /PROC - use command completion to display all files in proc
directory, pick one and CAT it

REDIRECTION

redirect output to another place

* eg PS -ADELF > /TMP/DUMP
* LESS /TMP/DUMP - line wrapping (from the above command) is now
viewable.

/VAR/LOG

When something goes wrong, and no messages are returned - LOOK HERE
(it's a directory).
Look here anyway and become familar with the layout and what is
captured.

* _/var/log_ tells all (that it knows about anyway).

GUI

GRAPHICAL USER INTERFACE
Is there a point in listing GUI applications? I can't picture
describing the mouse shortcuts, but the section is here if there's a
need.

Links:
------
[1] http://melbournewireless.org.au/#what_is_it_
[2] http://melbournewireless.org.au/#cli
[3] http://melbournewireless.org.au/#self_help
[4] http://melbournewireless.org.au/#man
[5] http://melbournewireless.org.au/#apropos
[6] http://melbournewireless.org.au/#info
[7] http://melbournewireless.org.au/#_h___help
[8] http://melbournewireless.org.au/#networking_commands
[9] http://melbournewireless.org.au/#pcmcia_cscard__commands_
[10] http://melbournewireless.org.au/#ifup__ifdown
[11] http://melbournewireless.org.au/#ifconfig
[12]
http://melbournewireless.org.au/#wireless_tools_iw__commands_
[13] http://melbournewireless.org.au/#ip
[14] http://melbournewireless.org.au/#route
[15] http://melbournewireless.org.au/#system_commands
[16] http://melbournewireless.org.au/#dmesg
[17] http://melbournewireless.org.au/#ps
[18] http://melbournewireless.org.au/#mod_utils
[19] http://melbournewireless.org.au/#other_commands
[20] http://melbournewireless.org.au/#terminal_shortcuts
[21] http://melbournewireless.org.au/#_alt_
[22] http://melbournewireless.org.au/#_shift___page_up_
[23] http://melbournewireless.org.au/#_tab_
[24] http://melbournewireless.org.au/#installing_or_building_packages
[25] http://melbournewireless.org.au/#apt
[26] http://melbournewireless.org.au/#emerge
[27] http://melbournewireless.org.au/#misc___but_still_important
[28] http://melbournewireless.org.au/#enable_forwarding
[29] http://melbournewireless.org.au/#_proc
[30] http://melbournewireless.org.au/#redirection
[31] http://melbournewireless.org.au/#_var_log
[32] http://melbournewireless.org.au/#gui
[33] http://melbournewireless.org.au/?Linux
[34] http://www.icon.co.za/~psheer/book/index.html
[35] http://melbournewireless.org.au/?Linux
[36] http://melbournewireless.org.au/?SSH
[37] http://melbournewireless.org.au/?SerialConsole
[38] http://melbournewireless.org.au/?RedHat
[39] http://melbournewireless.org.au/?Debian
[40] http://melbournewireless.org.au/?Debian
[41] http://melbournewireless.org.au/?RedHat
[42] http://melbournewireless.org.au/?Debian
[43] http://www.gentoo.org

[EditText] [Spelling] [Current] [Raw] [Code] [Diff] [Subscribe] [VersionHistory] [Revert] [Delete] [RecentChanges]

> home> about> events> files> members> maps> wiki board   > home   > categories   > search   > changes   > formatting   > extras> site map

Username
Password

 Remember me.
>

> forgotten password?
> register?
currently 0 users online
Node Statistics
building132
gathering193
interested515
operational233
testing214