树莓派4B装机指南(有屏幕)

若没有屏幕可用, 可以看这篇博文"树莓派4B装机指南(无屏幕)"

  1. 使用"SD Card Formatter"格式化SD卡

  2. 使用"Win32 Disk Imager"将系统镜像写入SD卡

  3. 无视系统关于SD卡的所有报错,打开SD卡,找到config.txt,在其中添加以下内容

    max_usb_current=1
    hdmi_group=1
    hdmi_mode=1
    hdmi_mode=87
    hdmi_cvt 1024 600 60 6 0 0 0
    hdmi_force_hotplug=1
    config_hdmi_boost=4
  4. micro-HDMI选择左边的接口

  5. 开机引导,最后一步"检查更新"选择跳过

  6. sudo vim /etc/apt/sources.list

    写入以下内容

    deb https://mirrors.tencent.com/debian/ bullseye main non-free contrib
    deb-src https://mirrors.tencent.com/debian/ bullseye main non-free contrib
    deb https://mirrors.tencent.com/debian-security/ bullseye-security main
    deb-src https://mirrors.tencent.com/debian-security/ bullseye-security main
    deb https://mirrors.tencent.com/debian/ bullseye-updates main non-free contrib
    deb-src https://mirrors.tencent.com/debian/ bullseye-updates main non-free contrib
    deb https://mirrors.tencent.com/debian/ bullseye-backports main non-free contrib
    deb-src https://mirrors.tencent.com/debian/ bullseye-backports main non-free contrib

    保存后sudo apt update && sudo apt upgrade -y更新一下即可.

  7. 安装 Vim

    sudo apt install vim

    配置

    sudo vim ~/.vimrc

    改为

    syntax on
    set nocompatible
    set number
    set cursorline
    set ruler
    set fileformat=unix
    set autoindent
    set cindent
    set tabstop=2
    set softtabstop=2
    set shiftwidth=2
    set expandtab "缩进用空格来表示
    set showmatch "高亮显示匹配的括号
    set matchtime=5 "匹配括号高亮的时间(单位是十分之一秒)
    set scrolloff=3 "光标移动到buffer的顶部和底部时保持3行距离
    set laststatus=2 "启动显示状态行(1), 总是显示状态行(2)
    set backspace=2 "使backspace键正常处理indent, eol, start
    set langmenu=zh_CN.UTF-8
    set helplang=cn
    set ignorecase "搜索忽略大小写
    set hlsearch "高亮显示匹配字符(回车后)
    set incsearch "搜索实时高亮显示所有匹配的字符
    "set autoread "设置当文件被改动时自动载入
    "可以在buffer使用鼠标
    set mouse=a
    set selection=exclusive
    set selectmode=mouse,key
posted @   方清欢  阅读(846)  评论(0编辑  收藏  举报
编辑推荐:
· AI与.NET技术实操系列:基于图像分类模型对图像进行分类
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
阅读排行:
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· 25岁的心里话
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· ollama系列01:轻松3步本地部署deepseek,普通电脑可用
· 按钮权限的设计及实现
点击右上角即可分享
微信分享提示