系统及扩展配置 - David-DHC/Ubuntu-22.04 GitHub Wiki
nvidia显卡配置
(参考资料)
- 执行
ubuntu-drivers devices查看本机所需要的nvidia driver类型
== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
modalias : pci:v000010DEd00001F95sv000017AAsd00003F95bc03sc00i00
vendor : NVIDIA Corporation
driver : nvidia-driver-460-server - distro non-free
driver : nvidia-driver-450-server - distro non-free
driver : nvidia-driver-460 - distro non-free
driver : nvidia-driver-470 - distro non-free recommended
driver : nvidia-driver-470-server - distro non-free
driver : xserver-xorg-video-nouveau - distro free builtin
- 上面列出的driver里面,批注
recommended的就是我们要安装的。sudo apt-get install nvidia-driver-470即可。 - 在NVIDIA X Server Settings里面,找到PRIME Profiles选项卡,选中NVIDIA(Performance Mode)。
- 重启。重启前应当确保拔掉显示器的hdmi线,直到系统完成启动并顺利进入GUI界面后再插上。
Gnome extension的手动安装
(参考资料)
- 进入Gnome Extension官网,先选择本机Gnome版本,再下载匹配本版本Gnome的最新版本extension的zip。
- 解压,点开其中的metadata.json,复制
uuid的值,并将extension文件夹的名称改为这个值。 - 把改好名字的文件夹复制到~/.local/share/gnome-shell/extensions/中
Alt+F2打开Run a command界面,输入字母r之后按回车以重启Gnome,如此便安装成功。
搜狗拼音输入法
(参考资料)
sudo apt-get install fcitx安装fcitx输入系统。- 下载安装包,并利用
sudo dpkg -i "文件名"进行安装。 - 此时如果显示缺少依赖,则按照要求安装这些以来,然后重装安装包。
- 打开
Settings——Language and Region——Manage Installed Languages,在“Language”这个标签下点击Install / Remove Languages,弹出弹窗中勾选中文(简体);而后回到“Language”这个标签,在Keyboard input method system中勾选fcitx。 - 重启即可。
apt source list
# deb cdrom:[Ubuntu 20.04.3 LTS _Focal Fossa_ - Release amd64 (20210819)]/ focal main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://cn.archive.ubuntu.com/ubuntu/ focal main restricted
# deb-src http://cn.archive.ubuntu.com/ubuntu/ focal main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://cn.archive.ubuntu.com/ubuntu/ focal-updates main restricted
# deb-src http://cn.archive.ubuntu.com/ubuntu/ focal-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://cn.archive.ubuntu.com/ubuntu/ focal universe
# deb-src http://cn.archive.ubuntu.com/ubuntu/ focal universe
deb http://cn.archive.ubuntu.com/ubuntu/ focal-updates universe
# deb-src http://cn.archive.ubuntu.com/ubuntu/ focal-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://cn.archive.ubuntu.com/ubuntu/ focal multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ focal multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ focal-updates multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ focal-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://cn.archive.ubuntu.com/ubuntu/ focal-backports restricted universe multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu focal partner
# deb-src http://archive.canonical.com/ubuntu focal partner
deb http://security.ubuntu.com/ubuntu focal-security restricted
# deb-src http://security.ubuntu.com/ubuntu focal-security main restricted
deb http://security.ubuntu.com/ubuntu focal-security universe
# deb-src http://security.ubuntu.com/ubuntu focal-security universe
deb http://security.ubuntu.com/ubuntu focal-security multiverse
# deb-src http://security.ubuntu.com/ubuntu focal-security multiverse
# This system was installed using small removable media
# (e.g. netinst, live or single CD). The matching "deb cdrom"
# entries were disabled at the end of the installation process.
# For information about how to configure apt package sources,
# see the sources.list(5) manual.
sudo su条件下仍然保证命令行以彩色显示
(参考资料)
- 执行
sudo su进入超级管理员模式 gedit /root/.bashrc,找到force_color_prompt=no一句(这句也可能被注释成#force_color_prompt=yes了),改成force_color_prompt=yes。Ctrl+D退出超级管理员模式。再执行sudo su时就和正常情况下共用同一套配色方案了。
命令行tab补全文件(名)或路径时不区分大小写
(参考资料)
- 执行
sudo su进入超级管理员模式 - 执行
gedit /etc/inputrc,加入一行set completion-ignore-case on - 保存后重启电脑。完成。
文件管理器中支持右键新建文件
(参考资料)
- 在~/下创建新文件夹Templates。
- Templates中的文件相当于模板文件,都可以支持右键新建出来(里面的内容也会一并保存)。
问题:右键新建时不会显示文件扩展名。
终端变成全白色的解决方案
- 检查~/.bashrc内容并与/etc/skel/.bashrc中的内容比对
- 如果明显后者远多于前者,则将后者的内容复制到前者当中
- 登出用户再登入即可。
格式化卸载Ubuntu只保留Windows系统后,再次重启时只能进入Grub的解决方案
(以下基于Grub2)
chainloader /efi/Microsoft/Boot/bootmgfw.efiboot