Archive

Archive for the ‘Linux’ Category

Arch Linux: warning: Setting locale failed

May 5th, 2009 No comments
C:
  1. perl: warning: Setting locale failed.
  2. perl: warning: Please check that your locale settings:
  3. LANGUAGE = (unset),
  4. LC_ALL = (unset),
  5. LC_COLLATE = "C",

edit /etc/locale.gen (sample file) *and then* run locale-gen

Categories: Linux Tags: , ,

Linux Extract Script

March 13th, 2009 No comments
CODE:
  1. The following function will decompress a wide range of compressed filetypes. Add the function to '~/.bashrc' and then run with the syntax 'extract MyCompressedFile'
  2.  
  3.  extract () {
  4.    if [ -f $1 ] ; then
  5.        case $1 in
  6.            *.tar.bz2)   tar xvjf $1    ;;
  7.            *.tar.gz)    tar xvzf $1    ;;
  8.            *.bz2)       bunzip2 $1     ;;
  9.            *.rar)       rar x $1       ;;
  10.            *.gz)        gunzip $1      ;;
  11.            *.tar)       tar xvf $1     ;;
  12.            *.tbz2)      tar xvjf $1    ;;
  13.            *.tgz)       tar xvzf $1    ;;
  14.            *.zip)       unzip $1       ;;
  15.            *.Z)         uncompress $1  ;;
  16.            *.7z)        7z x $1        ;;
  17.            *)           echo "don't know how to extract '$1'..." ;;
  18.        esac
  19.    else
  20.        echo "'$1' is not a valid file!"
  21.    fi
  22.  }

Categories: Linux Tags: , ,

Arch

February 2nd, 2009 No comments

Change Webmin user password

/opt/webmin/changepass.pl /etc/webmin <user> <pwd>

Allow connection from IP

vi /etc/webmin/miniserv.conf

Categories: Linux Tags: , , ,

Protected: Backtrack – WEP crack: auto-wep-crack.sh

December 22nd, 2008 Enter your password to view comments.

This post is password protected. To view it please enter your password below:


Categories: Linux Tags: , , ,

Linux bash history

November 8th, 2008 No comments
CODE:
  1. cd ~
  2. vim .inputrc
  3.  
  4. copy / paste
  5.  
  6. "\e[5~": history-search-backward
  7. "\e[6~": history-search-forward

http://www.electrictoolbox.com/history-search-auto-completion-bash-shell-ubuntu/

Categories: Linux Tags:

Linux: clarkconnect link domain to user home directory

August 28th, 2008 No comments
CODE:
  1. (v webminu) odprem fajl /etc/fstab v katerem na koncu dodam:
  2. /var/www/virtual/domena.si /home/user/www none rw,bind 0 0

Categories: Linux Tags:

Ettercap 0.7.3 for PCLinuxOS

June 8th, 2008 No comments

Install:

CODE:
  1. rpm -ivh ettercap-ng-073-1mdv20070i586.rpm

ettercap 0.7.3

ettercap -G

Categories: Linux Tags:

TinyMe Synaptic

May 29th, 2008 No comments
CODE:
  1. http://spout.ussg.indiana.edu/linux/pclinuxos/pclinuxos/apt/
  2. pclinuxos/2007
  3. main extra nonfree kde

CODE:
  1. http://distro.ibiblio.org/pub/linux/distributions/tinyme/apt/
  2. 2007
  3. main nonfree tinyme

Categories: Linux Tags:

Linux find route gateway and internet device IP

May 25th, 2008 No comments
CODE:
  1. #!/bin/sh
  2.  
  3. for i in $( route -n | grep UG | awk '{print $2}' )
  4. do
  5. echo $i
  6. done

Find ip

CODE:
  1. ifconfig eth0 |  awk -F: '/inet addr:/{print $2}' | awk '{print $1}'

Remove invalid gateways

CODE:
  1. #!/bin/sh
  2.  
  3. WAN=`zenity --entry --text="Vpisi mrezno kartico, ki je povezana na internet; ponavadi: eth0, wlan0"`
  4. if [ -z $WAN ]
  5. then
  6. echo "Vpisi vmrezno kartico!"
  7. exit
  8. fi
  9.  
  10. for i in $( route -n | grep UG  | grep -v $WAN | awk '{print $2}' )
  11. do
  12. route del default gw $i
  13. done

Categories: Linux Tags:

Linux command line reference for common operations

May 24th, 2008 No comments
Categories: Linux Tags:

Linux: add | delet route

May 22nd, 2008 No comments

Checking the route table in Linux

CODE:
  1. netstat -rn
  2. route -n

Adding and Removing a Network in Linux

CODE:
  1. route add -net 10.10.10.0/24 gw 192.168.0.1
  2. route del -net 10.10.10.0/24 gw 192.168.0.1

Adding and Removing a specific host in Linux

CODE:
  1. route add -host 10.10.10.45 gw 192.168.0.1
  2. route del -host 10.10.10.45 gw 192.168.0.1

Adding a Default GW in Linux

CODE:
  1. route add default gw 192.168.0.1
  2. route del default gw 192.168.0.1

Categories: Linux Tags:

Resize a VMWare disk

April 23rd, 2008 No comments

Turn off the virtual machine;
Commit/remove all the snapshots first! (I forgot to mention this, thanks JimO)
Create a good backup of the files!;

Open a Command Prompt and go to:
C:\Program Files\VMWare\VMWare Server

Run this command to expand the virtual disk:

CODE:
  1. vmware-vdiskmanager -x 12GB "My harddisk.vmdk"

Note: Because this only expands the disk and not the partition, you'll need to resize the partition table as well. This can be done by 3rd party tools like 'Partition Magic', but also with 'diskpart.exe', builtin into Windows. In my case, this disk is a boot disk, meaning it can't be done on the virtual machine itself. I used another my 2nd virtual machine, running Windows XP.

Add the increased hard disk to a second virtual machine (must be turned off first!).

http://www.leonmeijer.nl/archive/2007/05/07/25.aspx

Categories: Linux Tags: , ,

Linux set eth0

April 23rd, 2008 No comments
CODE:
  1. ifconfig eth0 192.168.0.1 netmask 255.255.255.0 broadcast 192.168.0.255 up

Če

CODE:
  1. route

pri gateway nima vpisanega wireless gatewaya je potrebno ponovno nastaviti rute tabelo

CODE:
  1. route del default

Categories: Linux Tags:
0 pages viewed, 0 today
0 visits, 0 today
FireStats icon Powered by FireStats