重启关机
sudo reboot sudo shutdown -h now
启用root
sudo passwd root
su root
设置静态IP
修改文件:sudo vim /etc/dhcpcd.conf
interface eth0 static ip_address=192.168.0.10/24 static routers=192.168.0.1 static domain_name_servers=192.168.0.1 interface wlan0 static ip_address=192.168.0.200/24 static routers=192.168.0.1 static domain_name_servers=192.168.0.1
eth0是有线的配置 , wlan0是无线配置
ip_address就是静态IP , 后面要接/24
routers是网关
static domain_name_servers是DNS
国内镜像源
nano或者vi 编辑 /etc/apt/sources.list 文件
树莓派3代以上的jessie 系统:
deb http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ jessie main non-free contrib deb-src http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ jessie main non-free contrib deb http://mirrors.aliyun.com/raspbian/raspbian/ jessie main contrib non-free rpi deb http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ stretch main contrib non-free deb http://mirrors.aliyun.com/raspbian/raspbian/ stretch main non-free contrib deb-src http://mirrors.aliyun.com/raspbian/raspbian/ stretch main non-free contrib
执行:
apt-get update && apt-get upgrade -y
文件夹
mkdir XXX rm -rf XXX
挂载u盘
//安装exFat驱动 sudo apt-get install exfat-fuse //创建目录 sudo mkdir /mnt/udisk
//查看设备名称
sudo fdisk -l //加载 sudo mount -o uid=pi,gid=pi /dev/sda1 /mnt/udisk //用完之后卸载 sudo umount /mnt/udisk
Linux防火墙:iptables禁IP与解封IP常用命令
https://blog.csdn.net/qjc_501165091/article/details/51225984
iptables -I INPUT -s ***.***.***.*** -j DROP