Qter 发表于 2020-11-29 11:44:24

树莓派常用命令

本帖最后由 Qter 于 2020-11-29 21:56 编辑

树莓派查看硬盘空间使用
df -h
文件系统         容量   已用可用   已用% 挂载点
/dev/root      15G4.9G8.8G36%    /
devtmpfs      460M   0460M   0%    /dev
tmpfs         464M   46M418M10%    /dev/shm
tmpfs         464M   18M446M   4%   /run
tmpfs         5.0M4.0K5.0M   1%   /run/lock
tmpfs         464M   0464M   0%   /sys/fs/cgroup
/dev/mmcblk0p1   41M   21M   21M51%   /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 RMSIZE RO TYPE MOUNTPOINT
mmcblk0   179:0    0 14.6G0 disk
├─mmcblk0p1 179:1    0 41.5M0 part /boot
└─mmcblk0p2 179:2    0 14.5G0 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 toxxx







页: [1]
查看完整版本: 树莓派常用命令