I will just post a quick way to setup a network interface from command line. We will analyze the case of wireless lan with hidden essid and static ip address:
root@ubuntu:~# iwconfig ath0 essid "myEssid"
root@ubuntu:~# ifconfig ath0 192.168.3.3
root@ubuntu:~# route add default gw 192.168.3.1
Showing posts with label Linux console. Show all posts
Showing posts with label Linux console. Show all posts
Wednesday, February 13, 2008
Thursday, January 31, 2008
For cycle from shell
Let's see a small example of a for cycle directly inside the shell:
me@ubuntu:~/workspace/myFile$ for file in *
> do
> echo $file
> grep foo $file
> done
test.txt
hi, my name is foo
In this case we will cycle all the files in the current directory, print out their names and grep "foo" for each one. Of course you can simply make recursive grep with * as file input parameter... but this can be a startup point for more complex operations
me@ubuntu:~/workspace/myFile$ for file in *
> do
> echo $file
> grep foo $file
> done
test.txt
hi, my name is foo
In this case we will cycle all the files in the current directory, print out their names and grep "foo" for each one. Of course you can simply make recursive grep with * as file input parameter... but this can be a startup point for more complex operations
Tuesday, December 11, 2007
Change locale & language inside ssh terminal
First you can have an overview of the setting of the system you are working with typing:
$ locale
You will obtain a list of all the avaiable locale setting (language, currecy, date....):
LANG=de_DE.UTF-8
LC_CTYPE="de_DE.UTF-8"
LC_NUMERIC="de_DE.UTF-8"
LC_TIME="de_DE.UTF-8"
LC_COLLATE="de_DE.UTF-8"
LC_MONETARY="de_DE.UTF-8"
LC_MESSAGES="de_DE.UTF-8"
LC_PAPER="de_DE.UTF-8"
LC_NAME="de_DE.UTF-8"
LC_ADDRESS="de_DE.UTF-8"
LC_TELEPHONE="de_DE.UTF-8"
LC_MEASUREMENT="de_DE.UTF-8"
LC_IDENTIFICATION="de_DE.UTF-8"
LC_ALL=
At this point we can modify the language:
$ export LANG=en_UK.UTF-8
Obviously once you will have logged out you will lose all your setting.
$ locale
You will obtain a list of all the avaiable locale setting (language, currecy, date....):
LANG=de_DE.UTF-8
LC_CTYPE="de_DE.UTF-8"
LC_NUMERIC="de_DE.UTF-8"
LC_TIME="de_DE.UTF-8"
LC_COLLATE="de_DE.UTF-8"
LC_MONETARY="de_DE.UTF-8"
LC_MESSAGES="de_DE.UTF-8"
LC_PAPER="de_DE.UTF-8"
LC_NAME="de_DE.UTF-8"
LC_ADDRESS="de_DE.UTF-8"
LC_TELEPHONE="de_DE.UTF-8"
LC_MEASUREMENT="de_DE.UTF-8"
LC_IDENTIFICATION="de_DE.UTF-8"
LC_ALL=
At this point we can modify the language:
$ export LANG=en_UK.UTF-8
Obviously once you will have logged out you will lose all your setting.
Subscribe to:
Posts (Atom)