How to add ppa repository on kali linux

1.Download this file :

root@k4linux:/# wget http://blog.anantshri.info/content/uploads/2010/09/add-apt-repository.sh.txt

File backup:

#!/bin/bash
if [ $# -eq 1 ]
NM=`uname -a && date`
NAME=`echo $NM | md5sum | cut -f1 -d" "`
then
    ppa_name=`echo "$1" | cut -d":" -f2 -s`
    if [ -z "$ppa_name" ]
    then
        echo "PPA name not found"
        echo "Utility to add PPA repositories in your debian machine"
        echo "$0 ppa:user/ppa-name"
    else
        echo "$ppa_name"
        echo "deb http://ppa.launchpad.net/$ppa_name/ubuntu lucid main" >> /etc/apt/sources.list
        apt-get update >> /dev/null 2> /tmp/${NAME}_apt_add_key.txt
        key=`cat /tmp/${NAME}_apt_add_key.txt | cut -d":" -f6 | cut -d" " -f3`
        apt-key adv --keyserver keyserver.ubuntu.com --recv-keys $key
        rm -rf /tmp/${NAME}_apt_add_key.txt
    fi
else
    echo "Utility to add PPA repositories in your debian machine"
    echo "$0 ppa:user/ppa-name"
fi

2.Save this file in /usr/sbin/ :

 root@k4linux:/# cp add-apt-repository.sh.txt /usr/sbin/add-apt-repository

3.Change permissions to execute :

 root@k4linux:/# chmod o+x /usr/sbin/add-apt-repository

4.Change ownership to root :

 root@k4linux:/# chown root:root /usr/sbin/add-apt-repository

5.Now when ever you need to execute command type :

 root@k4linux:/# sudo add-apt-repository ppa: ppa - name_
-->H5 { margin-bottom: 0.08in; }H5.cjk { font-family: "Droid Sans Fallback"; }H5.ctl { font-family: "FreeSans"; }P { margin-bottom: 0.08in; }A:link { }

see the video tutorial :

width="640" height="360" src="https://www.youtube.com/embed/R6XDuDmKvFk?feature=player_embedded" allowfullscreen="">
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值