linux常用操作

获得符合grep条件的进程号并杀死

ps -ef | grep pts
kill 查到的pid

这里的ps -ef 是查看所有进程,ps拿出来的用户 进程和pid离得比较近,手机用top看屏幕太窄,有用信息又挤在两边,往往找对应pid找花眼

e 显示所有进程(-e all processes )

f 全格式(-f full)

ps是命令,参数要写在-后面,可以写在一起,如ps -ef,ps -aux等

grep过滤其他关键字也一样,不只是杀死其他用户终端

kali2滚动源

deb http://http.kali.org/kali kali-rolling main non-free contrib


新服开启vsftpd

apt-get install vsftpd
nano /etc/ftpuser
#注释掉root
service vsftpd start

apt-get出现没有公钥

gpg --keyserver pgpkeys.mit.edu --recv-key  ED444FF07D8D0BF6
gpg -a --export ED444FF07D8D0BF6 |  apt-key add -
apt-get update

添加中文支持

dpkg-reconfigure locales

install pip

Install pip and virtualenv for Ubuntu 10.10 Maverick and newer
 
apt-get install python-pip python-dev build-essential 
pip install --upgrade pip 
pip install --upgrade virtualenv 
For older versions of Ubuntu
 
Install Easy Install
apt-get install python-setuptools python-dev build-essential 
Install pip
easy_install pip 
Install virtualenv
pip install --upgrade virtualenv 


apt-get dist-upgrade

mysql_config not found

apt-get install libmysqlclient-dev
wget https://sourceforge.net/projects/mysql-python/files/mysql-python/1.2.3/MySQL-python-1.2.3.tar.gz
tar -xzvf MySQL-python-1.2.3.tar.gz 
cd MySQL-python-1.2.3.tar.gz 
python setup.py install

Metasploit  Bundle Gem

apt-get install ruby
gem install bundle
cd metasploit-framework
bundle install  

/ mkmf.rb can’t find header files for ruby at…

 如果是在centos等系统下面,执行命令:yum  install   ruby-devel 

  如果是在Ubuntu等系统下面,执行命令:apt-get  isntall   ruby-dev  
checking for pg_config... no
No pg_config... trying anyway
apt-get install Postgresql

apt-get install lib[lack_of ***.h]-dev

发表评论