树莓派 ubuntu server 初始化记录
作者:互联网
-
初始化的用户名和密码
-
用户名:
ubuntu
-
密码:
ubuntu
-
-
连接到wifi
-
nmcli
连接
-
-
关闭自动更新:
-
/etc/apt/apt.conf.d/10periodic
,APT::Periodic::Update-Package-Lists "0";
-
-
开启
ssh
:-
sudo apt-get install openssh-server
-
dpkg -l | grep ssh
查看服务是否被安装 -
sudo sshd
开启服务
-
-
换用阿里源: (20.04)
-
sudo su
cp /etc/apt/sources.list /etc/apt/sources.list.bak_`date "+%y_%m_%d"`
sed -i 's/http:\/\/.*.ubuntu.com/https:\/\/mirrors.aliyun.com/g' /etc/apt/sources.list
apt update
apt upgrade
-
-
挂载交换分区:
-
dd if=/dev/zero of=/root/swapfile bs=1M count=1024
创建1GB大小的文件 -
mkswap /root/swapfile
创建交换文件系统 -
swapon /root/swapfile
启用交换文件 -
/etc/fstab
添加/root/swapfile swap swap defaults 0 0
开机自启
-
标签:树莓,swapfile,sudo,apt,server,etc,ubuntu,root 来源: https://www.cnblogs.com/NoobSirPersonalBlog/p/15724974.html