二、Config
(1)设置静态IP
/etc/network/interfaces
auto eth0
iface eth0 inet static
address xxx.xxx.xxx.xxx
gateway xxx.xxx.xxx.xxx
netmask 255.255.255.0
重置网络:
1
|
$ /etc/init.d/networking restart
|
(2)设置路由
1
|
$ route add default gw xxx.xxx.xxx.xxx
|
(3)DNS
/etc/resolv.conf
(4)挂载
1
|
$ mount -o nolock,wsize=1024,rsize=1024 目标主机IP:挂载路径 树莓派路径
|
禁止屏幕进入保护和关闭状态:
/etc/bash.bashrc
setterm -blank 0 -powerdown 0
(8)enable ssh
- Enter
sudo raspi-config
in a terminal window
- Select
Interfacing Options
- Navigate to and select
SSH
- Choose
Yes
- Select
Ok
- Choose
Finish