Hi,聆听·彼岸



听说,你是我最遥不可及的梦。
What should I do?
What should I do?
I think I'm going to fall in love with myself.

VM-Ubuntu-linux

发表于 2022-10-02| 分类于 linux | | 评论数

安装教程百度
sudo是root权限执行的意思,如果不想用可以直接su切换root用户
Ubuntu版本20.04
安装完

查看版本信息

lsb_release -a

设置root密码

sudo passwd root

换源

备份

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak

修改

sudo vim /etc/apt/sources.list
#或者
sudo gedit /etc/apt/sources.list

删除该文件里的全部内容,复制源直接替换掉,这里提供了阿里云及其他的源,任选一个就可以

# 阿里源
deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse

#清华源
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse

#中科大源
deb https://mirrors.ustc.edu.cn/ubuntu/ focal main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ focal main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ focal-security main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ focal-security main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse

#更新软件列表
sudo apt-get update

#更新软件
sudo apt-get upgrade

大概就可以愉快地玩耍了

linux常用命令

ls
ls -l
clear
cd
mkdir
rmdir # 删除空目录
rm
cp
mv
chmod [-R] xyz 文件或目录
chmod u=rwx,g=rx,o=r test1 # 修改 test1 权限
chmod (who)(+-=)(rwx) file
cat # 由第一行开始显示文件内容
tac # cat倒着写
nl # cat+行号
useradd 选项 用户名
useradd –d /home/sam -m sam
userdel 选项 用户名
userdel -r sam
df -h
mount /dev/hdc6 /mnt/hdc6
umount /dev/hdc6
sudo apt update
sudo apt upgrade
sudo apt install <package_name>
sudo apt install <package_name> --no-upgrade
sudo apt install <package_name> --only-upgrade
sudo apt install <package_name>=<version_number>
apt search libimobile
apt show pinta
apt list --upgradeable
sudo apt autoremove # 清理不再使用的依赖和库文件
ip addr
nohup /root/runoob.sh > file.log 2>&1 &
kill -9 进程号PID
killall -9 name
man
ps
zip
tar
unzip
passwd
export
shutdown

满分是10分的话,这篇文章你给几分,您的支持将鼓励我继续创作!