Raspbian Stretch 初始化

Raspbian Stretch 初始化

1
2
3
4
5
6
RASPBIAN STRETCH LITE
Minimal image based on Debian Stretch
Version:August 2017
Release date:2017-08-16
Kernel version:4.9
Release notes:Link

默认用户名是pi 密码是raspberry

默认没有开启ssh

1
2
3
2016-11-25:
* SSH disabled by default; can be enabled by creating a file with name "ssh" in boot partition
* Prompt for password change at boot when SSH enabled with default password unchanged
1
2
在SD卡boot分区新建一个文件
touch ssh

sudo -s

1
2
3
4
5
6
7
8
9
10
11
12
df -h

root@raspberrypi:/home/pi# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 15G 1.1G 13G 8% /
devtmpfs 460M 0 460M 0% /dev
tmpfs 464M 0 464M 0% /dev/shm
tmpfs 464M 6.2M 458M 2% /run
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 464M 0 464M 0% /sys/fs/cgroup
/dev/mmcblk0p1 42M 21M 21M 51% /boot
tmpfs 93M 0 93M 0% /run/user/1000

raspi-config

1
2
3
4
5
6
7
8
# 扩展系统分区
7.Advanced Options->A1 Expand Filesystem

# 更改时区
4.Localisation Options->I2 Change Timezone Aisa/Shanghai

# 重启系统
reboot
1
2
3
4
5
6
7
8
9
10
11
12
df -h

root@raspberrypi:/home/pi# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 15G 1.1G 13G 8% /
devtmpfs 460M 0 460M 0% /dev
tmpfs 464M 0 464M 0% /dev/shm
tmpfs 464M 12M 452M 3% /run
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 464M 0 464M 0% /sys/fs/cgroup
/dev/mmcblk0p1 42M 21M 21M 51% /boot
tmpfs 93M 0 93M 0% /run/user/1000

设置静态IP地址

1
2
3
4
5
6
7
8
9
vi /etc/dhcpcd.conf

interface enxb827eb15f13c
static ip_address=192.168.3.254/24
static routers=192.168.3.1
static domain_name_servers=114.114.114.114 8.8.8.8

# 重启系统
reboot

更新软件源

USTC
1
2
3
4
5
6
7
cat >/etc/apt/sources.list<<EOF
deb http://mirrors.ustc.edu.cn/raspbian/raspbian/ stretch main non-free contrib
deb-src http://mirrors.ustc.edu.cn/raspbian/raspbian/ stretch main non-free contrib
EOF

# 更新系统
apt-get update && apt-get upgrade

常用软件

1
apt-get -y install lrzsz vim git unzip

×

纯属好玩

扫码支持
扫码打赏,你说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

文章目录
  1. 1. Raspbian Stretch 初始化
    1. 1.1. 默认用户名是pi 密码是raspberry
      1. 1.1.0.1. 默认没有开启ssh
      2. 1.1.0.2. raspi-config
      3. 1.1.0.3. 设置静态IP地址
      4. 1.1.0.4. 更新软件源
        1. 1.1.0.4.1. USTC
      5. 1.1.0.5. 常用软件
,