1. Download
Official website
Tsinghua mirror station (recommended)
Beiwai-kubuntu
USTC-USTC-
USTC-USTC-repogen/
Aliyun
Aliyun-Ubuntu mirror configuration reference
Two, configure the virtual machine
[Custom]
Click "Next", here [Default], and then click "Next".
Click "Install the operating system later", and then click "Next".
Click "Linux(L)", select [Ubuntu 64-bit] for the version, and then click "Next".
Enter the name you want to set and the location you want to install , and then click "Next".
Change the number of cores to 2, and click "Next".
The memory is set to 4096MB, which is 4G, and then click "Next".
Select "Use Network Address Translation", and then click "Next".
Select "LSI Logic(L)" and click "Next".
Select "SCSI(S)", and then click "Next".
Select "Create a new virtual disk", and then click "Next".
Set it to 40G , it is recommended to set it larger, if it is not enough later, it will be troublesome to modify. Select " Split the virtual disk into multiple files "
[Default] here, and then click "Next".
Click "Finish".
Click " Edit Virtual Machine Settings ".
As shown in the figure, click "Browse", select the image you downloaded, click OK , and click " Start this virtual machine " on the left .
3. Install Ubuntu
Select " Install Ubuntu "
Select " English "
Select " Use wired connection "
Select " Normal installation "
Select " Erase disk and install Ubuntu "
" Ready to install " Click Insatll
Select your timezone (select time zone)
Set up your account (set up account)
Choose your theme (select your theme), click Next to start the installation.
start installation:
After the installation is complete, click " Restart now " to restart.
Click " skip ":
Click " Next ":
Click " Next ":
Click " Done ":
3. Change source
3.1 Graphically change the source
Select the mirror source of "University of Science and Technology of China":
Set the mirror source of "University of Science and Technology of China" Success interface:
3.2 Change source by command line
Edit the sources.list file
sudo vim /etc/apt/sources.list
Replace the content inside with:
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb https://mirrors.ustc.edu.cn/ubuntu/ lunar main restricted
# deb-src http://cn.archive.ubuntu.com/ubuntu lunar main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb https://mirrors.ustc.edu.cn/ubuntu/ lunar-updates main restricted
# deb-src http://cn.archive.ubuntu.com/ubuntu lunar-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb https://mirrors.ustc.edu.cn/ubuntu/ lunar universe
# deb-src http://cn.archive.ubuntu.com/ubuntu lunar universe
deb https://mirrors.ustc.edu.cn/ubuntu/ lunar-updates universe
# deb-src http://cn.archive.ubuntu.com/ubuntu lunar-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb https://mirrors.ustc.edu.cn/ubuntu/ lunar multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu lunar multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ lunar-updates multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu lunar-updates multiverse
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb https://mirrors.ustc.edu.cn/ubuntu/ lunar-backports main restricted universe multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu lunar-backports main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ lunar-security main restricted
# deb-src http://cn.archive.ubuntu.com/ubuntu lunar-security main restricted
deb https://mirrors.ustc.edu.cn/ubuntu/ lunar-security universe
# deb-src http://cn.archive.ubuntu.com/ubuntu lunar-security universe
deb https://mirrors.ustc.edu.cn/ubuntu/ lunar-security multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu lunar-security multiverse
Press ESC, and then enter: wq, save.
3.3 Backup source files
sudo cp /etc/apt/sources.list There should be a space here /etc/apt/sources.list.backup2023416djc 3.4 Update the source file
sudo apt-get update
3.5 Updating the software
sudo apt-get upgrade
If the source and software can be updated normally, it means that the source change is successful.
Fourth, install and configure SSH
4.1 Specific steps to configure SSH
#1、安装openssh-client
sudo apt install openssh-client
#2、安装openssh-server
sudo apt install openssh-server
#3、ssh服务重启
service ssh restart
#4、安装net-tools (使用ifconfig时,需要net-tools)
sudo apt install net-tools
#5、查看ip,找到inet的值
ifconfig
#6、验证SSH是否正在运行
sudo systemctl status ssh
##如果为inactive(dead),可以手动开启SSH##
/etc/init.d/ssh start
#补充:
#启用ssh的指令
启动ssh服务:
#sudo /etc/init.d/ssh start
停止ssh服务:
#sudo /etc/init.d/ssh stop
重启ssh服务:
#sudo /etc/init.d/ssh restart
When the ssh service needs to be started manually :
#7、如果在系统上启用了防火墙,要设置打开SSH的端口
sudo ufw allow ssh
//查看防火墙状态
sudo ufw status
//打开/关闭防火墙
sudo ufw enable/disable
Check the firewall status and open the firewall:
set the firewall to open the SSH port:
4.2 backup sshd_config file
#sshd_config.backup2023416.djc为新备份文件名称
sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.backup2023416.djc
4.3 Modify the content of sshd_config
4.3.1 Modifications
#具体的操作步骤如下:
1、编辑sshd_config
sudo vi /etc/ssh/sshd_config
或者
sudo vim /etc/ssh/sshd_config
2、将PermitRootLogin prohibit-password修改为PermitRootLogin yes,去掉前面的#号。
将port 22前面的#去掉。
3、保存(ESC键,:wq!)
3、重启SSH服务(最后一步)。
service ssh restart
After using the sudo vi command to edit sshd_config, press the English letter i to start insert editing content, and the arrow keys to control the cursor position. Here, if you press the arrow keys and find ABCD letters appear , you need to correct this error to move the cursor position. For the method, please refer to 4.3.2 The solution of changing the arrow keys into letters under Ubuntu .
After the modification is completed, press the ESC key, :wq! (here is "colon:", "letter w", "letter q", "exclamation point!", press in sequence), and the modification just now can be saved.
Use the cat command to view the content, and found that the modification of sshd_config has been successful.
4.3.2 The solution to change the arrow keys into letters under Ubuntu
# 1、卸载系统的vi编辑器
sudo apt-get remove vim-common
# 2、安装最新的vim编辑器
sudo apt-get install vim
5. SSH connection
5.1 Get ip address
#找到inet的值
ifconfig
#确保ssh状态为active(running),如果inactive(dead),使用/etc/init.d/ssh start 命令开启
sudo systemctl status ssh
5.2 Remote login to Ubuntu using tools
Enter the login username:
Successful login:
You can also see the previously backed up sshd_config file in the graphical interface:
You can also see the previously backed up sources.list file in the graphical interface:
Sixth, get the root user
When installing software, etc., it may prompt that the permissions are insufficient. The process of obtaining root permissions is as follows:
7. Configure Chinese and Chinese input methods
7.1 Configure Chinese
Click the first symbol in the upper right, click Settings.
Enter language
and click Region&language , manage installed Languages , Install/Remove Language.
In the pop-up Installed Languages window, check Chinese (simplified)
and click "Apply".
Enter the password
to start downloading the source.
Unzip . Check Region&language
again , and find that there are multiple Chinese . Click ""Chinese"" and click Select. Click Logout and re-enter the password to log in again. Prompt that the language change has taken effect Check whether Chinese is in effect globally
7.2 Configure Chinese input method
1、sudo apt install ibus安装框架。
2、im-config -s ibus命令切换框架。
3、sudo apt install ibus-gtk ibus-gtk3 安装相应的平台支持包。
4.输入sudo apt install ibus-pinyin安装拼音输入法。
Click keyboard in Settings to view Input Sources . At present, there is only the default Enlish (US) during installation , American English. Click on the "+" sign. Select Chinese , select Chinese(Intelligent Pinyin) , click Add Chinese(Intelligent Pinyin) has been added to the Input Sources input source, click en and click Chinese(Intelligent Pinyin) to input Chinese:
7.3 Configure and enable the interface of Chinese and input methods
8. Install the screen recording software OBS Studio
#从下面的1开始,这个先跳过,因为不是必要的。
#运行以下3个命令确保所有系统包都是最新的 apt 终端中的命令
###[**建议**先不执行3个命令,如果1、2、3、4全执行了,无法成功安装OBS Studio再来执行这个命令,
再继续走一遍1、2、3、4的安装过程]
sudo apt update
sudo apt upgrade
sudo apt install wget apt-transport-https gnupg2
#1、安装一个ffmpeg依赖
sudo apt install ffmpeg
#2、安装虚拟摄像机驱动:
sudo apt install v4l2loopback-dkms
#3、默认情况下,OBS Studio 在 Ubuntu 基础存储库中不可用。添加 OBS Studio 存储库到Ubuntu 系统
sudo add-apt-repository ppa:obsproject/obs-studio
#4、启用存储库后,使用命令安装最新版本
sudo apt update
sudo apt install obs-studio
Enter obs, you can see the newly installed OBS Studio:
Started OBS Studio:
Official link:
https://obsproject.com/kb/linux-installation
https://obsproject.com/zh-cn/download
Replenish:
(ufw防火墙相关命令)
Usage: ufw COMMAND
Commands:
enable enables the firewall
disable disables the firewall
default ARG set default policy
logging LEVEL set logging to LEVEL
allow ARGS add allow rule
deny ARGS add deny rule
reject ARGS add reject rule
limit ARGS add limit rule
delete RULE|NUM delete RULE
insert NUM RULE insert RULE at NUM
prepend RULE prepend RULE
route RULE add route RULE
route delete RULE|NUM delete route RULE
route insert NUM RULE insert route RULE at NUM
reload reload firewall
reset reset firewall
status show firewall status
status numbered show firewall status as numbered list of RULES
status verbose show verbose firewall status
show ARG show firewall report
version display version information
Application profile commands:
app list list application profiles
app info PROFILE show information on PROFILE
app update PROFILE update PROFILE
app default ARG set default application policy
(ufw防火墙相关命令)
sudo apt-get install package 安装软件包
sudo apt-get install package - - reinstall 重新安装软件包
sudo apt-get -f install 修复安装软件包"-f = ——fix-missing"
sudo apt-get remove package 删除软件包
sudo apt-get remove package - - purge 删除软件包,包括删除配置文件等
sudo apt-get update 更新源及/etc/apt/sources.list
sudo apt-get upgrade 更新已安装的软件包
sudo apt-get dist-upgrade 升级系统安装的软件包
sudo apt-get dselect-upgrade 使用 dselect 升级
sudo apt-get build-dep package 安装相关的编译环境
sudo apt-get clean && sudo apt-get autoclean 清理无用的软件包
sudo apt-get check 检查是否有损坏的依赖
apt-cache search package 搜索软件包
apt-cache show package 获取包的相关信息,如说明、大小、版本等
apt-cache depends package 了解使用依赖a
apt-cache rdepends package 是查看该软件包被哪些软件包依赖