目录

Raspberry in common use

一、Raspberry

二、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:挂载路径 树莓派路径

(5)显示器分辨率设置

(6)禁止屏幕休眠

禁止屏幕进入保护和关闭状态:

/etc/bash.bashrc

setterm -blank 0 -powerdown 0

(7)制作镜像

(8)enable ssh

  1. Enter sudo raspi-config in a terminal window
  2. Select Interfacing Options
  3. Navigate to and select SSH
  4. Choose Yes
  5. Select Ok
  6. Choose Finish
1
$ service sshd restart