firemail
标题:
树莓派常用命令
[打印本页]
作者:
Qter
时间:
2020-11-29 11:44
标题:
树莓派常用命令
本帖最后由 Qter 于 2020-11-29 21:56 编辑
树莓派查看硬盘空间使用
df -h
文件系统 容量 已用 可用 已用% 挂载点
/dev/root 15G 4.9G 8.8G 36% /
devtmpfs 460M 0 460M 0% /dev
tmpfs 464M 46M 418M 10% /dev/shm
tmpfs 464M 18M 446M 4% /run
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 464M 0 464M 0% /sys/fs/cgroup
/dev/mmcblk0p1 41M 21M 21M 51% /boot
tmpfs 93M 0 93M 0% /run/user/1000
lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 9.1 (stretch)
Release: 9.1
Codename: stretch
uname -a
Linux raspberrypi 4.9.59-v7+ #1047 SMP Sun Oct 29 12:19:23 GMT 2017 armv7l GNU/Linux
lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
mmcblk0 179:0 0 14.6G 0 disk
├─mmcblk0p1 179:1 0 41.5M 0 part /boot
└─mmcblk0p2 179:2 0 14.5G 0 part /
sudo fdisk -l
Disk /dev/ram0: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram1: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
....
树莓派开启 ssh
sudo raspi-config
选择 Interfacing options项中的ssh,打开后重启即可。
登录
ssh
pi@192.168.1.131
密码: raspberry
安装nodejs
$ curl -sL
https://deb.nodesource.com/setup_8.x
| sudo -E bash -
$ sudo apt install nodejs
安装完成后查看版本
$ node -v
v8.9.3
修改密码
sudo raspi-config
选择1 Change User Password或 modify password to xxx
欢迎光临 firemail (http://firemail.wang:8088/)
Powered by Discuz! X3