简介
树莓派4b安装kali2020.3
安装后开放ssh
sudo apt-get update;
sudo apt-get install -y ufw;
sudo ufw allow 22;
sudo reboot;
目前发现需要重启才生效
换源
sudo sed -i "s/http.kali.org/mirrors.aliyun.com/g" /etc/apt/sources.list;
sudo apt-get update;
export DEBIAN_FRONTEND=noninteractive;
sudo apt-get install sudo wget curl unzip netcat htop autojump unrar net-tools vim bash zsh git ttf-wqy-microhei ttf-wqy-zenhei xfonts-intl-chinese -y;
ssh
curl https://github.com/chnxyzz.keys >> ~/.ssh/authorized_keys;
sudo chmod 600 ~/.ssh/authorized_keys;
sudo sed -i 's/#PasswordAuthentication yes/PasswordAuthentication no/g' /etc/ssh/sshd_config;
sudo systemctl enable ssh && sudo systemctl restart ssh;
vim配置
curl https://raw.githubusercontent.com/chnxyzz/linux_install/master/vim/vimrc.txt -o ~/.vimrc;
sudo cp ~/.vimrc /root/.vimrc;
oh-my-zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/chnxyzz/oh-my-zsh/master/tools/install.sh)";
换时区
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime;
echo 'Asia/Shanghai' >/etc/timezone;
设置locale
echo "export LC_ALL=en_US.UTF-8" >> /etc/profile
echo "export LC_CTYPE=en_US.UTF-8" >> /etc/profile
swap
export swapfile=/swap.img;
sudo swapoff $swapfile;
sudo dd if=/dev/zero of=$swapfile bs=4k count=512k;
sudo mkswap $swapfile;
sudo swapon $swapfile;