Difference between pages "Package:WPA Supplicant" and "Package:Bash"

(Difference between pages)
 
m (Fix pipes with {{!}} instead of nowiki in order to preserve colorization)
 
Line 1: Line 1:
 
{{Ebuild
 
{{Ebuild
|Summary=wpa_supplicant is a cross-platform supplicant with support for open, WEP, WPA and WPA2. It handles scanning, connection and automatic reconnect to access points. wpa_supplicant has <code>wpa_cli</code> and <code>wpa_gui</code> frontends and <code>wpa_supplicant</code> daemon.
+
|Summary=The standard GNU Bourne-again shell.
|CatPkg=net-wireless/wpa_supplicant
+
|CatPkg=app-shells/bash
 
|Maintainer=
 
|Maintainer=
|Homepage=http://hostap.epitest.fi/wpa_supplicant/
 
 
}}
 
}}
 +
This is the ebuild for <tt>bash</tt>, the standard shell for Funtoo Linux systems.
  
== Configuration ==
+
'''Bash''' is the GNU Project's ''Bourne Again SHell'', a complete implementation of the IEEE POSIX and Open Group shell specification with interactive command line editing, job control on architectures that support it, csh-like features such as history substitution and brace expansion, and a slew of other features. [http://tiswww.case.edu/php/chet/bash/bashtop.html]
You can configure <code>wpa_supplicant</code> daemon by editing <code>/etc/wpa_supplicant/wpa_supplicant.conf</code>.
+
{{file|name=/etc/wpa_supplicant/wpa_supplicant.conf|lang=|desc=wpa_supplicant daemon config|body=
+
# provide control interface for wpa_cli and wpa_gui frontends
+
ctrl_interface=/run/wpa_supplicant
+
  
# allow wpa_cli and wpa_gui to update config
+
== Learning Bash ==
update_config=1
+
  
network={
+
The following articles, written originally for IBM developerWorks by Daniel Robbins, serve as an excellent introduction to the bash shell:
ssid="SSID"
+
psk="passphrace"
+
}
+
  
network={
+
* [[Bash by Example, Part 1]]
ssid="SSID2"
+
* [[Bash by Example, Part 2]]
key_mgmt=NONE
+
* [[Bash by Example, Part 3]]
}
+
}}
+
  
== Daemon ==
+
== Moving on Command Line ==
Start daemon with [[openrc]].
+
<console>
+
###i## /etc/init.d/wpa_supplicant start
+
</console>
+
You can also add it to default runlevel.
+
<console>
+
###i## rc-update add wpa_supplicant default
+
</console>
+
  
The daemon can work independently or you can use wpa_cli and wpa_gui frontends. You can also alter configs with frontends.
+
{|class="table table-striped"
 +
|| Shortcut || Description
 +
|-
 +
|| <code>Tab</code> || Autocomplete
 +
|-
 +
|| <code>Ctrl + r</code> || Search as you type from lastlog
 +
|-
 +
|| <code>Ctrl + a</code> || Move to the start of line
 +
|-
 +
|| <code>Ctrl + e</code> || Move to the end of line
 +
|-
 +
|| <code>Ctrl + k</code> || Cut from cursor to the end of line
 +
|-
 +
|| <code>Ctrl + w</code> || Cut from cursor to the previous whitespace
 +
|-
 +
|| <code>Ctrl + c</code> || Clear line
 +
|-
 +
|| <code>Ctrl + l</code> || Clear screen
 +
|-
 +
||<code>Alt + f</code> || Move one word forward
 +
|-
 +
|| <code>Alt + b</code> || Move one word backwards
 +
|-
 +
|| <code>Alt + d</code> || Cut from cursor to the end of word
 +
|-
 +
|| <code>Alt + backspace</code> || Cut from cursor to the start of word
  
== wpa_cli CLI Frontend ==
+
|}
You can start cli frontend by running <code>wpa_cli</code>.
+
<console>
+
###i## wpa_cli
+
</console>
+
  
=== Scan Access Points ===
+
== Bash Completion ==
<console>
+
See [[Package:Bash completion|bash completion page]].
>##i## scan
+
OK
+
<3>CTRL-EVENT-SCAN-STARTED
+
<3>CTRL-EVENT-SCAN-RESULTS
+
>##i## scan_results
+
bssid / frequency / signal level / flags / ssid
+
50:32:75:ee:b6:fb      2462    -41    [WPA2-PSK-CCMP][ESS]    AndroidAP
+
00:3a:98:99:12:f3      2412    -71    [WPA2-EAP-CCMP][ESS]   wEKSOTE
+
00:3a:98:99:12:f0      2412    -71    [WPA2-EAP-CCMP][ESS]    wULAPPA
+
00:23:33:a2:7d:14      2462    -85    [WPA2-EAP-CCMP][ESS]    SaitaBYOD
+
00:3a:98:99:12:f1      2412    -70    [ESS]  saitaOpen
+
</console>
+
  
=== Connect to Access Point ===
+
== Configuration Files ==
<console>
+
=== ~/.bashrc ===
>##i## add_network
+
<code>~/.bashrc</code> gets loaded on bash startup. You can source files, put aliases, functions and export variables there.
0
+
{{file|name=~/.bashrc|lang=bash|desc=bash runtime configuration|body=
>##i## set_network 0 ssid "SSID"
+
source /etc/profile.d/bash-completion.sh
>##i## set_network 0 psk "passphrase"
+
>##i## enable_network 0
+
<2>CTRL-EVENT-CONNECTED - Connection to 00:00:00:00:00:00 completed (reauth) [id=0 id_str=]
+
</console>
+
  
=== Save config ===
+
export EDITOR="vim"
<console>
+
>##i## save_config
+
OK
+
</console>
+
  
== wpa_gui GUI Frontend ==
+
alias mv='mv -v'
<code>wpa_gui</code> is simple gui frontend. You can start it by running <code>wpa_gui</code>.
+
alias cp='cp -v'
<console>
+
alias rm='rm -v'
###i## wpa_gui
+
</console>
+
  
== Autoconfigure IP with dhcpcd ==
+
alias e='emerge'
You can use [[Package:dhcpcd]] to autoconfigure ip address.
+
alias eu='emerge -uavDN --with-bdeps=y @world'
<console>
+
 
###i## emerge -av dhcpcd
+
alias used='cat  ~/.bash_history {{!}} sort {{!}} uniq -c {{!}} sort -n'
###i## /etc/init.d/dhcpcd start
+
 
</console>
+
calculator() {
 +
        echo "$@" {{!}} bc
 +
}
 +
}}
  
 
{{EbuildFooter}}
 
{{EbuildFooter}}

Revision as of 18:05, October 2, 2014

app-shells/bash


Source Repository:Funtoo Overlay

Summary: The standard GNU Bourne-again shell.

Use Flags

bashlogger
Log ALL commands typed into bash; should ONLY be used in restricted environments such as honeypots
mem-scramble
Build with custom malloc/free overwriting allocated/freed memory
net
Enable /dev/tcp/host/port redirection
plugins
Add support for loading builtins at runtime via 'enable'

Bash

This is the ebuild for bash, the standard shell for Funtoo Linux systems.

Bash is the GNU Project's Bourne Again SHell, a complete implementation of the IEEE POSIX and Open Group shell specification with interactive command line editing, job control on architectures that support it, csh-like features such as history substitution and brace expansion, and a slew of other features. [1]

Learning Bash

The following articles, written originally for IBM developerWorks by Daniel Robbins, serve as an excellent introduction to the bash shell:

Moving on Command Line

Shortcut Description
Tab Autocomplete
Ctrl + r Search as you type from lastlog
Ctrl + a Move to the start of line
Ctrl + e Move to the end of line
Ctrl + k Cut from cursor to the end of line
Ctrl + w Cut from cursor to the previous whitespace
Ctrl + c Clear line
Ctrl + l Clear screen
Alt + f Move one word forward
Alt + b Move one word backwards
Alt + d Cut from cursor to the end of word
Alt + backspace Cut from cursor to the start of word

Bash Completion

See bash completion page.

Configuration Files

~/.bashrc

~/.bashrc gets loaded on bash startup. You can source files, put aliases, functions and export variables there.

~/.bashrc: bash runtime configuration (bash source code)
source /etc/profile.d/bash-completion.sh
 
export EDITOR="vim"
 
alias mv='mv -v'
alias cp='cp -v'
alias rm='rm -v'
 
alias e='emerge'
alias eu='emerge -uavDN --with-bdeps=y @world'
 
alias used='cat  ~/.bash_history | sort | uniq -c | sort -n'
 
calculator() {
        echo "$@" | bc
}