树莓派2的初始化环境设置

HDMI转VGA输出

烧录好img后,将TF卡中的config.txt文件的修改如下内容:

hdmi_force_hotplug=1
config_hdmi_boost=4
hdmi_group=2
hdmi_mode=9
hdmi_drive=2
hdmi_ignore_edid=0xa5000080
disable_overscan=1

树莓派初始化配置

  • 终端中输入sudo raspi-config
  • 扩展储存卡
    Expand Filesystem
  • 修改默认密码
    Change User Password
    输入2次密码。
  • 设置时区和键盘
    选择Internationalisation Options
  1. 时区
    Change Timezone-Asia-Chongqing
    在树莓派能上网的前提下,输入date看看显示出的时间是否正确
  2. 键盘
    Change Keyboard Layout

设置WiFi连接

  1. sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
    添加
network={
    ssid="wahaha"
    psk="12345678"
}

如果wifi没有密码则是这种格式:

network={
ssid="wahaha"
key_mgmt=NONE 
}
  1. 重启无线网卡先sudo ifdown wlan0sudo ifup wlan0
  2. ifconfig查看wlan0网卡是否获取到了IP地址

修改软件源

  • 编辑sudo nano /etc/apt/sources.list
  • 将原软件源用#注释掉
  • 添加新的软件源(中国科技技术大学)
    deb http://mirrors.ustc.edu.cn/raspbian/raspbian/ wheezy main contrib non-free rpi
  • 更新软件源列表
    sudo apt-get update
  • 更新系统
    sudo apt-get upgrade
  • 更多的软件源树莓派实验室

中山大学Raspbian http://mirror.sysu.edu.cn/raspbian/raspbian/
中国科学技术大学Raspbian http://mirrors.ustc.edu.cn/raspbian/raspbian/
清华大学Raspbian http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/
华中科技大学
Raspbian http://mirrors.hustunique.com/raspbian/raspbian/
Arch Linux ARM http://mirrors.hustunique.com/archlinuxarm/
大连东软信息学院源(北方用户)Raspbian http://mirrors.neusoft.edu.cn/raspbian/raspbian/
重庆大学源(中西部用户)Raspbian http://mirrors.cqu.edu.cn/Raspbian/raspbian/
新加坡国立大学Raspbian http://mirror.nus.edu.sg/raspbian/raspbian
牛津大学Raspbian http://mirror.ox.ac.uk/sites/archive.raspbian.org/archive/raspbian/
韩国KAIST大学Raspbianhttp://ftp.kaist.ac.kr/raspbian/raspbian/

安装screen

  • 安装
    终端中输入sudo apt-get install screen
  • 创建
    screen
  • 取回
    screen -x

你可能感兴趣的:(树莓派2的初始化环境设置)