How to install virtualbox on kali

#os Linux evankali 4.7.0-kali1-amd64 #1 SMP Debian 4.7.8-1kali1 (2016-10-24) x86_64 GNU/Linux

echo 'deb http://download.virtualbox.org/virtualbox/debian stretch contrib
' >> /etc/apt/sources.list

# combine downloading and registering:
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
#or
wget -c https://www.virtualbox.org/download/oracle_vbox_2016.asc
sudo apt-key add oracle_vbox_2016.asc
apt-get update
apt-get install virtualbox-5.1

https://www.virtualbox.org/wiki/Linux_Downloads

Xfce Terminal install from source

Xfce Terminal install from source

Install

If you want to install Terminal from source, you can either go through the steps of compiling and installing Terminal yourself, or use our popular installer. In either case, the following software is required on your computer in order to successfully compile and install Terminal:

D-BUS (0.23 or above)
VTE Terminal Widget (0.11.11 or above)
Xfce libraries (4.2.0)
Gtk+ Library (2.4.0 or above)
exo Library (0.3.0 or above), included with the installer
Also make sure that you install the header files for the packages listed above. If you are using a package system like RPM, these are usually found in the -devel variants of the packages.

Installing from source

It is highly recommended to install terminal into the same prefix as Xfce. Assuming you installed Xfce to /usr/local, you would perform the following steps to compile and install Terminal:

# export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
# tar xzf Terminal-X.Y.Z.tar.gz
# cd Terminal-X.Y.Z
# ./configure –prefix=/usr/local
# make
# make install

If everything went ok, you can now start Terminal with the following command:

$ Terminal

http://www.os-cillation.de/en/open-source-projects/xfce-terminal/

kali初始化

添加软件源:
因为系统默认只有kali官方的源,其他的常用软件源没有,所以我们要手动添加。
PS:kali linux 1.0是基于debian 7 wheezy的,所以我们只要添加wheezy的源即可。另外因为本人比较喜欢一些新的软件。所以也添加了sid源,所以软件都比较新呢 当然你也可以对应换成 163 mirrors 的,可能速度更加不错呢


#现在的源 用国内的比较快
#deb http://http.kali.org/kali kali-rolling main non-free contrib
#现在的国内官方mirrors
deb http://mirrors.neusoft.edu.cn/kali kali-rolling main non-free contrib

deb http://mirrors.aliyun.com/kali kali-rolling main non-free contrib


echo 'evan ALL=(ALL) NOPASSWD:NOPASSWD:ALL' >/etc/sudoers.d/evan

#安装 mate-desktop 同样是添加 debian wheezy源,然后添加key 和开始安装 好像失效了见本文最后面吧

apt-get install mate-archive-keyring -y
apt-get update
apt-get install mate-desktop-environment -y
apt-get install mate-desktop-environment-extra -y

apt-get install fcitx fcitx-table-wbpy libreoffice libreoffice-help-zh-cn rednotebook filezilla evince pidgin pcmanfm gedit sshpass exaile -y
iptux qq gimp thunderbird

https://jianguoyun.com/static/exe/installer/ubuntu/nautilus_nutstore_amd64.deb

#这样就可以远程图形连接 这样不用两台桌面老是切来切去的
sudo apt-get install xrdp -y
sudo service xrdp start
sudo apt-get install vnc4server tightvncserver

第一部分 输入法
vi /etc/apt/sources.list #添加源 ,确保有源 因为现在安装后只有一个 Security updates,但是在本本上安装的是源是完整的 好怪哦
apt-get update -y
sudo apt-get install fcitx fcitx-table-wbpy ttf-wqy-microhei ttf-wqy-zenhei
sudo apt-get install alarm-clock-applet

http://www.linuxidc.com/Linux/2013-07/86778.htm

xmonad
apt-get install xmonad libghc-xmonad-dev libghc-xmonad-contrib-dev xmobar xcompmgr nitrogen stalonetray moreutils synapse ssh-askpass-gnome

kali linux安装chrome

首先从google 的网站上下载deb文件
https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
#下载后安装
dpkg -i google-chrome-stable_current_amd64.deb

apt-get install bzip2 gzip gcc g++ cpp make libxml2-dev openssl

#安装编译工具

sudo apt-get install build-essential autoconf automake cvs subversion
sudo apt-get install unrar p7zip-full cabextract

#desktop上使用的 icedove(thunderbird) gcalctool计算器 gnochm 好像源里面没有 network-manager-gnome(这个不太好用)

apt-get install keepass2 openbox openfetion exaile wget bzip2 unzip zip xfce4-terminal cairo-dock synaptic gmchess shutter unrar-free stardict pidgin supertux filezilla icedove icedove-l10n-zh-cn iceweasel iceweasel-l10n-zh-cn mysql-client gcalctool kdesvn rapidsvn wireshark pinta transmission homebank network-manager-gnome -y

## chmsee http://code.google.com/p/chmsee/ 下载 源码 or 二进制包 apt-get -f install 然后 dkpg 不太行

## pdf http://www.fuxinsoftware.com.cn/pdf/desklinux/downloads.html

#下面这个有些是服务器比较用到的

apt-get install openbox vim exaile wget bzip2 unzip zip nmap tree lynx fileutils ncftp lftp gnochm shutter unrar-free stardict pidgin supertux filezilla icedove vlc fcitx fcitx-table-wbpy

********************

How to install virtualbox on kali
#这种一般没有依赖问题呢
#os Linux evankali 4.7.0-kali1-amd64 #1 SMP Debian 4.7.8-1kali1 (2016-10-24) x86_64 GNU/Linux

echo 'deb http://download.virtualbox.org/virtualbox/debian stretch contrib
' >> /etc/apt/sources.list

# combine downloading and registering:
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
#or
wget -c https://www.virtualbox.org/download/oracle_vbox_2016.asc
sudo apt-key add oracle_vbox_2016.asc

apt-get update
apt-get install virtualbox-5.1

https://www.virtualbox.org/wiki/Linux_Downloads

virtualbox
apt-get install virtualbox

先到官方下载 二进制包 建议这个方法
apt-get -f install
aptitude search linux-headers

debian 升级后virtualbox 启动不了


系统内核升级至最新,然后安装内核头文件:apt-get install linux-headers-$(uname -r)

##问题
ninstalling old VirtualBox DKMS kernel modules …done.
Trying to register the VirtualBox kernel modules using DKMSError! echo
Your kernel headers for kernel 3.14-kali1-amd64 cannot be found at
/lib/modules/3.14-kali1-amd64/build or /lib/modules/3.14-kali1-amd64/source.
…failed!
(Failed, trying without DKMS)
Recompiling VirtualBox kernel modules …failed!
(Look at /var/log/vbox-install.log to find out what went wrong)

cat /var/log/vbox-install.log
Makefile:183: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR= and run Make again。 停止。

解决 过程
网上都说是 Install Kernel Headers Package 这个思路是没错的,不过网上留传的很多命令在kali 上不能能

evan@evankali:~/software$ aptitude search linux-headers
p linux-headers-3.18.0-kali1-all – All header files for Linux 3.18 (meta-package)
p linux-headers-3.18.0-kali1-all-amd64 – All header files for Linux 3.18 (meta-package)
i linux-headers-3.18.0-kali1-amd64 – Header files for Linux 3.18.0-kali1-amd64
i A linux-headers-3.18.0-kali1-common – Common header files for Linux 3.18.0-kali1
p linux-headers-3.18.0-kali3-all – All header files for Linux 3.18 (meta-package)
p linux-headers-3.18.0-kali3-all-amd64 – All header files for Linux 3.18 (meta-package)
i linux-headers-3.18.0-kali3-amd64 – Header files for Linux 3.18.0-kali3-amd64
i linux-headers-3.18.0-kali3-common – Common header files for Linux 3.18.0-kali3
i linux-headers-amd64 – Header files for Linux amd64 configuration (meta-package)

sudo apt-get install inux-headers-3.18.0-kali1-amd64

#这个好像有时要多执行几次
apt-get install virtualbox-dkms dkms -y
apt-get -f install

会连带安装如下Kernel Headers 而 apt-get install -y linux-headers-$(uname -r) 这个匹配出来的不对呢
linux-headers-3.18.0-kali3-amd64 #有点迷惑的是我在 install dkms 时好像有安装后来成功而用的 linux-headers-3.18.0-kali3-amd64 为什么昨天不行,原来是kali1 不是kali3的
linux-headers-3.18.0-kali3-common linux-headers-amd64
linux-kbuild-3.18 virtualbox virtualbox-dkms virtualbox-qt

http://superuser.com/questions/499059/unable-to-install-virtualbox-specify-kern-dir-directory-installing-vir

apt-get install virtualbox-dkms -y
apt-get install dkms -y
/etc/init.d/vboxdrv setup

Kernel Headers Installation
https://forums.kali.org/showthread.php?21494-Kernel-Headers-Installation

Kernel Headers 原来是下面这些呀 apt-get install -y linux-headers-$(uname -r) 这个匹配出来的不对呢
linux-headers-3.18.0-kali3-amd64
linux-headers-3.18.0-kali3-common linux-headers-amd64
linux-kbuild-3.18 virtualbox virtualbox-dkms virtualbox-qt

root@evankali:~# apt-get install -y linux-headers-$(uname -r)
正在读取软件包列表… 完成
正在分析软件包的依赖关系树
正在读取状态信息… 完成
E: 未发现软件包 linux-headers-3.14-kali1-amd64
E: 无法按照正则表达式 linux-headers-3.14-kali1-amd64 找到任何软件包

http://www.cnblogs.com/sheldonxu/archive/2012/04/15/2450396.html

Debian / Ubuntu Linux Install Kernel Headers Package
http://www.cyberciti.biz/faq/howto-install-kernel-headers-package/

××××××××××
about firefox

sudo su -;
cd /usr/bin
ls -l ./iceweasel # 得知真正的文件为../lib/iceweasel/iceweasel
cd ../lib/iceweasel/
mv iceweasel bakiceweasel
ln -s /home/evan/program/firefox/firefox iceweasel
××××××××××

让普通用户有关机权限
van@debian:~$ vi /home/evan/.bashrc
## 这些是命令别名
alias ifconfig=’/sbin/ifconfig’
alias halt='sudo poweroff'
alias reboot=’sudo /sbin/reboot’
vi /etc/sudoers
### by evan 让evan 这个用户 sudo 不用密码
evan ALL = NOPASSWD: ALL
以后 run halt 就可以关机喽
or
sudo vi /etc/sudoers
把/etc/sudoers裡面最後一行
%admin ALL=(ALL)
改為
%admin ALL=(ALL) NOPASSWD: NOPASSWD: ALL

Ubuntu上安装Kali-Linux的工具 ,导入Kali-Linux源
http://www.sqlmap.cc/%E5%AD%A6%E4%B9%A0/107.html


ln -fs /home/evan/program/thunderbird/thunderbird /usr/bin/thunderbird

#thunderbird desktop icon
evan@evankali:/usr/share/applications$ cat thunderbird.desktop
[Desktop Entry]
Encoding=UTF-8
Name=thunderbird
GenericName=thunderbird
Comment=IDE
Exec=/home/evan/program/thunderbird/thunderbird
Icon=/home/evan/program/thunderbird/icons/thunderbird.png
Terminal=false
X-MultipleArgs=false
StartupWMClass=Firefox
Type=Application
Categories=Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;video/webm;application/x-xpinstall;

自己添加个rednotebook.desktop 这样就可以用启动器启动rednotebook 了

[Desktop Entry]
Encoding=UTF-8
Name=rednotebook
GenericName=rednotebook
Comment=IDE
Exec=/home/evan/software/rednotebook-1.14/run
Icon=/home/evan/software/rednotebook-1.14/rednotebook.png
Terminal=false
X-MultipleArgs=false
StartupWMClass=Firefox
Type=Application
Categories=Utility;TextEditor;GTK;
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;video/webm;application/x-xpinstall;

How-to Install Thunderbird on Kali Linux Easy Guide

一些参考
kali linux下的中文输入法安装及iceweasel汉化
http://blog.csdn.net/eels_/article/details/37806983

http://blog.sina.com.cn/s/blog_40983e5e0101dhz0.html

http://www.backtrack.org.cn/thread-12770-1-1.html
http://blog.csdn.net/ysynhtt/article/details/39926469

How to install/remove mate Desktop/Window Manager in Kali Linux 1.x

echo “deb http://http.debian.net/debian wheezy-backports main” >> /etc/apt/sources.list && apt-get update
apt-get install kali-defaults kali-root-login desktop-base mate-core

官网文档
http://wiki.mate-desktop.org/download

How to install/remove different Desktop/Window Manager in Kali Linux 1.x
https://forums.kali.org/showthread.php?17716-How-to-install-remove-different-Desktop-Window-Manager-in-Kali-Linux-1-x

设置xrdp
echo “gnome-session –session=gnome-classic” > ~/.xsession
该命令的作用是由于安装了 gnome桌面,ubuntu12.04中同时存在unity、GNOME多个桌面管理器,需要启动的时候指定一个,不然
即使远程登录验证成功以后,也只是背景。
xrdp的配置文档在/etc/xrdp目录下的xrdp.ini和sesman.in,一般选择默认。

debian初始化 -testing

debian初始化 -testing

http://blog.csdn.net/shuzui1985/article/details/7592569

http://cn.docs.kali.org/category/general-use-cn
http://www.cnblogs.com/jamesarch/archive/2013/03/30/2991075.html

Kali-linux安装之后的简单设置

debian vpn 客户端配置pass

安装相关软件

apt install network-manager-pptp-gnome
#sudo apt-get install network-manager-pptp
sudo apt-get install pptp-linux

编辑VPN,Gateway填VPN服务器IP或域名,username password 是VPN用户名和密码。
如果VPN服务器是windows,还要单击“高级”按钮,验证方式只钩MSCHAP和MSCHAPv2

不能禁用EAP认证方式,所以还要按照下面的方法更改:

连接到windows server 2003 vpn
新立得里搜索pptp,安装
创建pptp连接
高级设置:认证方式只钩MSCHAPv2,钩上“使用MPPE”,选择128位
这三个要同时存在才行!如果连接失败,再看看是否配置正确。
或:用终端进gconf-editor ,system-networking-connections,展开那些123.看到有VPN的,
有如下require-mppe-128 yes,refuse-pap yes,refuse-eap yes,refuse-chap yes即可

#一开始这样
Using interface ppp0
Connect: ppp0 <--> /dev/pts/5
CHAP authentication succeeded
LCP terminated by peer (MPPE required but peer refused)
Script pptp bestfreevpn.com –nolaunchpppd finished (pid 18395), status = 0x0
Modem hangup
Connection terminated.

http://wiki.ubuntu.org.cn/VPN

http://forum.ubuntu.org.cn/viewtopic.php?t=280231

#############################

Now add a VPN user in /etc/ppp/chap-secrets file.

# sudo nano /etc/ppp/chap-secrets
The column is username. Second column is server name, you can put “pptpd” in there. Third column is password. The last column is the IP addresses, you can put * to allow all IP.

# client server secret IP addresses
username * myPassword *

vim /etc/ppp/chap-secrets

“evan” pptpd “1234” *

pptp 11.12.33.44

sudo pptpsetup –create myvpn –server xxx.xxx.xxx.xxx –username xx1 –password xx2–encrypt –start
sudo pptpsetup –create myvpn –server “” –username –password “” –encrypt –start

pptp ip noauth require-mppe-128 name uname nodetach mtu 1416

Debian 8 Gnome桌面如何安装fcitx五笔拼音输入法

Debian 8 Gnome桌面如何安装fcitx五笔拼音输入法

apt-get update
apt-get install fcitx fcitx-table-wbpy fcitx-config-gtkapt-get update
apt-get install fcitx fcitx-table-wbpy fcitx-config-gtk

配置fcitx五笔拼音输入法

上面的apt-get install命令完成后,重新登录系统,这样是为了检测新安装的输入法。然后以普通用户在终端里输入下面的命令打开fcitx输入法配置窗口。

fcitx-config-gtk3

在安装fcitx五笔拼音的同时也会安装拼音和双拼输入法,所以如果你只想要五笔拼音,那么可以在这个配置窗口里将拼音和双拼删除,保留键盘布局和五笔拼音输入法。

Telegram不能使用fcitx输入中文的解决办法

解决的方法很简单。打开home目录下的.bashrc文件。

vi ~/.bashrc

#将下面的三行命令添加到文件末尾。bashrc文件里的命令会在每次用户登录的时候执行。
export GTK_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx
export QT_IM_MODULE=fcitx

保存文件后重新登录系统。现在就可以在telegram里用fcitx输入中文了。

PS : 我遇到的问题是 gnome 3 fctix 不能用,换成mate 就可以了

debian (kali, ubuntu 通用)服务自启动

平时公司服务器 一般是centos 但是我个人喜欢debian 以前没感觉,现在才感觉到个人桌面的本本也有自启动ssh的需要,摘半天 才发现还真的没chkconfig来得方便 ,不过也可以是不习惯而已
于是记录了一下

debian (kali, ubuntu 通用)服务自启动

以openssh 举例

#ssh自启动
sudo update-rc.d ssh enable

#关闭
sudo update-rc.d ssh disable

或者实在没办法像下面这个,我记得去的第一个公司左右就是这样的 哈哈 一转眼,做LINUX运维好多年了,还是要谢谢左右给我了进入左右的这个机会的
tail /etc/rc.local
#/usr/bin/workrave
sudo /etc/init.d/ssh start
exit 0

Debian设置开机自动启动与关闭
http://www.tsingpost.com/articles/201404/643.html