查看系统版本以及系统其它信息:
uname -a
cat /proc/version
cat /proc/meminfo
等其它信息,系统信息都存放在/proc目录下的文件中。
安装软件:
在Ubuntu中有三种安装软件的方式,分别是:apt-get, snap, dpkg 。前两者是在线安装方式,dpkg是离线安装方式,用来安装离线deb包。值得注意的是snap方式安装的包,使用apt-get或者dpkg是不能被卸载的,也查找不能被其查找到,它是ubuntu最新推出的软件安装方式,有更好的软件隔离能力,当然也是占用磁盘空间最大的一种。
apt-get install redis-server
snap install firefox
dpkg -i https://dl.google.com/linux/deb/pool/main/g/google-chrome-stable/google-chrome-stable_126.0.6478.61-1_amd64.deb
查找软件:
sudo apt-cache seach redis
添加软件库镜像源:
国内ubuntu的软件镜像源有挺多机构提供,最近发现华为云源挺不错。Ubuntu发布版本不是版本号,而是一些有意思的动物名,源中的jammy, focal等也代表了其版本,譬如focal代表20, jammy代表22,其源中的这些字样也代表对应的版本。
sudo mv /etc/apt/sources.list /etc/apt/sources.list.bak --备份系统自带软件源
sudo vi /etc/apt/sources.list
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://repo.huaweicloud.com/ubuntu jammy main restricted
# deb-src http://repo.huaweicloud.com/ubuntu jammy main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://repo.huaweicloud.com/ubuntu jammy-updates main restricted
# deb-src http://repo.huaweicloud.com/ubuntu jammy-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 http://repo.huaweicloud.com/ubuntu jammy universe
# deb-src http://repo.huaweicloud.com/ubuntu jammy universe
deb http://repo.huaweicloud.com/ubuntu jammy-updates universe
# deb-src http://repo.huaweicloud.com/ubuntu jammy-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 http://repo.huaweicloud.com/ubuntu jammy multiverse
# deb-src http://repo.huaweicloud.com/ubuntu jammy multiverse
deb http://repo.huaweicloud.com/ubuntu jammy-updates multiverse
# deb-src http://repo.huaweicloud.com/ubuntu jammy-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 http://repo.huaweicloud.com/ubuntu jammy-backports main restricted universe multiverse
# deb-src http://repo.huaweicloud.com/ubuntu jammy-backports main restricted universe multiverse
deb http://repo.huaweicloud.com/ubuntu jammy-security main restricted
# deb-src http://repo.huaweicloud.com/ubuntu jammy-security main restricted
deb http://repo.huaweicloud.com/ubuntu jammy-security universe
# deb-src http://repo.huaweicloud.com/ubuntu jammy-security universe
deb http://repo.huaweicloud.com/ubuntu jammy-security multiverse
# deb-src http://repo.huaweicloud.com/ubuntu jammy-security multiverse
sudo apt-get update
基于ubuntu服务器安装ubuntu桌面
apt update && apt upgrade
apt install ubuntu-desktop
systemctl set-default graphical.target
systemctl start graphical.target
Ubuntu中安装中文输入法
在ubuntu中相关好用的还是谷歌拼音输入法,搜狗还是不怎么行。安装完成之后重启,之后再通过“Fcitx配置” 进行配置,配置完成后,一般可能需要重启才能生效。不生效是,重启总会带来希望。
https://blog.csdn.net/qq_39811006/article/details/136517379
sudo apt install fcitx
sudo apt install fcitx-googlepinyin
fcitx-config-gtk3
查询Linux的端口使用/占用情况