树莓派 3 常用设置

本文简要介绍了 树莓派 3 的常用设置。

SSH 登录

TF 卡 boot 新建一个名为 ssh 的空白文件。

官方的 Raspbian 系统默认的登录帐号:pi 密码:raspberry

常用配置

换源

编辑 /etc/apt/source.list 文件

# 注释存在的内容

Debian 9

1
2
deb http://mirrors.aliyun.com/raspbian/raspbian/ stretch main contrib non-free rpi
deb-src http://mirrors.aliyun.com/raspbian/raspbian/ stretch main contrib non-free rpi

Debian 8

1
2
deb http://mirrors.aliyun.com/raspbian/raspbian/ jessie main contrib non-free rpi
deb-src http://mirrors.aliyun.com/raspbian/raspbian/ jessie main contrib non-free rpi

改时区

1
$ dpkg-reconfigure tzdata

网络配置

DNS

编辑 /etc/resolvconf.conf 文件

1
2
# configure your subscribers configuration files below.
name_servers=127.0.0.1

静态 IP

注意:修改 /etc/network/interfaces 的方法已经过时

编辑 /etc/dhcpcd.conf 文件

1
2
3
4
5
6
7
8
9
10
11
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

Shell

Fish Shell

GitHub:https://github.com/fish-shell/fish-shell

1
2
3
4
$ autoreconf --no-recursive
$ ./configure
$ make
$ sudo make install

软件

Samba

http://shumeipai.nxez.com/2013/08/24/install-nas-on-raspberrypi.html

LNMP

Python、pip

Node.js、npm

硬件

SPI

使用以下命令开启 SPI

1
$ sudo raspi-config

WiFi

编辑 /etc/wpa_supplicant/wpa_supplicant.conf 文件

1
2
3
4
5
6
7
8
9
10
11
12
13
country=GB
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

#network={
# ssid="WIFINAME"
# psk="password"
#}

network={
ssid="CMCC.."
psk="000000000"
}

相关链接

0%