赞
踩
自定义分区
新建分区表
点击新建的空闲分区, 然后点加号
因为虚拟机设置选了UEFI , 所以先建立一个"EFI系统分区" , 设置大小,来它300兆
继续点 剩下的空闲分区, 再点加号
剩下的空间都个了根分区 /
没有设置 /boot
和 swap
分区, 只为做一下试验, 看能否安装
点 现在安装 按钮
点 继续 按钮
选时区
设置用户名密码
安装完成重启
点我已i完成安装 , 回车重启
启动成功, 没有设置 /boot
和 swap
分区 , 也能安装
设置硬件时钟(RTC)为本地时钟
sudo timedatectl set-local-rtc 1
z@ud224:~$ timedatectl Local time: 三 2022-11-09 19:24:43 CST Universal time: 三 2022-11-09 11:24:43 UTC RTC time: 三 2022-11-09 11:24:44 Time zone: Asia/Shanghai (CST, +0800) System clock synchronized: yes NTP service: active RTC in local TZ: no z@ud224:~$ sudo timedatectl set-local-rtc 1 [sudo] z 的密码: z@ud224:~$ timedatectl Local time: 三 2022-11-09 19:25:30 CST Universal time: 三 2022-11-09 11:25:30 UTC RTC time: 三 2022-11-09 19:25:30 Time zone: Asia/Shanghai (CST, +0800) System clock synchronized: yes NTP service: active RTC in local TZ: yes Warning: The system is configured to read the RTC time in the local time zone. This mode cannot be fully supported. It will create various problems with time zone changes and daylight saving time adjustments. The RTC time is never updated, it relies on external facilities to maintain it. If at all possible, use RTC in UTC by calling 'timedatectl set-local-rtc 0'.
通过 hwclock
命令可查看硬件时钟
不加sudo查看不到
hwclock: 无法通过已知的任何方式访问硬件时钟。
hwclock: Use the --verbose option to see the details of our search for an access method.
sudo hwclock
- 1
给root账户设置密码, sudo passwd root
, 设置密码后就能启用root账户
sudo passwd root
默认的 vi(vim) 不好用, 上下左右和退格键有问题
/etc/vim/vimrc.tiny
sudo nano /etc/vim/vimrc.tiny
sudo gedit /etc/vim/vimrc.tiny
将
set compatible
修改为
set nocompatible
set backspace=2
原版 /etc/vim/vimrc.tiny
" Vim configuration file, in effect when invoked as "vi". The aim of this
" configuration file is to provide a Vim environment as compatible with the
" original vi as possible. Note that ~/.vimrc configuration files as other
" configuration files in the runtimepath are still sourced.
" When Vim is invoked differently ("vim", "view", "evim", ...) this file is
" _not_ sourced; /etc/vim/vimrc and/or /etc/vim/gvimrc are.
" Debian system-wide default configuration Vim
set runtimepath=~/.vim,/var/lib/vim/addons,/usr/share/vim/vimfiles,/usr/share/vim/vim82,/usr/share/vim/vimfiles/after,/var/lib/vim/addons/after,~/.vim/after
set compatible
" vim: set ft=vim:
修改后的 /etc/vim/vimrc.tiny
" Vim configuration file, in effect when invoked as "vi". The aim of this
" configuration file is to provide a Vim environment as compatible with the
" original vi as possible. Note that ~/.vimrc configuration files as other
" configuration files in the runtimepath are still sourced.
" When Vim is invoked differently ("vim", "view", "evim", ...) this file is
" _not_ sourced; /etc/vim/vimrc and/or /etc/vim/gvimrc are.
" Debian system-wide default configuration Vim
set runtimepath=~/.vim,/var/lib/vim/addons,/usr/share/vim/vimfiles,/usr/share/vim/vim82,/usr/share/vim/vimfiles/after,/var/lib/vim/addons/after,~/.vim/after
set nocompatible
set backspace=2
" vim: set ft=vim:
vim-tiny
重装vim
sudo apt remove vim-tiny
sudo apt install vim
备份 /etc/apt/sources.list
### 两位年月日时分秒
sudo cp -a /etc/apt/sources.list /etc/apt/sources.list.$(date "+%y%m%d%H%M%S").bak
### 两位年月日时分秒+纳秒
sudo cp -a /etc/apt/sources.list /etc/apt/sources.list.$(date "+%y%m%d%H%M%S%N").bak
### 年-月-日 时:分:秒 , 因为有空格,又要使用$, 所以要加双引号
sudo cp -a /etc/apt/sources.list "/etc/apt/sources.list.$(date "+%F %T").bak"
### 标准: 年-月-日T时:分:秒 , 因为有空格,又要使用$, 所以要加双引号
sudo cp -a /etc/apt/sources.list "/etc/apt/sources.list.$(date "+%FT%T").bak"
备份的效果
编辑 /etc/apt/sources.list
sudo vi /etc/apt/sources.list
原先的内容不用保留, 全部替换为:
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。