ubuntu常用命令记录

(1)挂载exfat U盘:sudo apt-get install exfat-fuse

(2)ubuntu16.04和18.04更换国内源:https://blog.csdn.net/u012308586/article/details/102953882

sudo  gedit   /etc/apt/sources.list
sudo apt update

Server for china

# deb cdrom:[Ubuntu 18.04.5 LTS _Bionic Beaver_ - Release amd64 (20200806.1)]/ bionic 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/ bionic main restricted
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://cn.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic-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/ bionic universe
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic universe
deb http://cn.archive.ubuntu.com/ubuntu/ bionic-updates universe
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic-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/ bionic multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic-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/ bionic-backports main restricted universe multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic-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 bionic partner
# deb-src http://archive.canonical.com/ubuntu bionic partner

deb http://security.ubuntu.com/ubuntu bionic-security main restricted
# deb-src http://security.ubuntu.com/ubuntu bionic-security main restricted
deb http://security.ubuntu.com/ubuntu bionic-security universe
# deb-src http://security.ubuntu.com/ubuntu bionic-security universe
deb http://security.ubuntu.com/ubuntu bionic-security multiverse
# deb-src http://security.ubuntu.com/ubuntu bionic-security multiverse

(3)史上最良心的 Ubuntu desktop 美化优化指导(1)

(4)安装NVIDIA驱动:
参考连接:https://junchu.blog.csdn.net/article/details/107742457

sudo add-apt-repository ppa:graphics-drivers/ppa && sudo apt-get update
ubuntu-drivers devices
sudo ubuntu-drivers autoinstall
sudo reboot
nvidia-smi

如果报错的话:

# 修复依赖,升级软件包
sudo apt update && sudo apt -f install && sudo apt full-upgrade

(5)df -h 命令查看硬盘分区和使用情况
(6)Ubuntu开机报错“Started User Manager for UID 121“解决办法
进入boot后,安装NVIDIA驱动
(7)更新NVIDIA驱动后键鼠失灵
连校园网需要登录的电脑可以用手机USB共享热点
(8)更新Nvidia驱动后中文输入法依赖丢失:修复依赖和损坏的包sudo apt-get install -f
(9)突然无法上网,网络图标丢失

sudo touch /etc/NetworkManager/conf.d/10-globally-managed-devices.conf
sudo systemctl restart NetworkManager

参考链接:VMware ubuntu20突然没法上网,Network 中wired 图标消失!!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Ubuntu中,有几个常用的命令用于安装软件包,包括apt,apt-get,dpkg和pip。这些命令可以帮助你安装、升级和移除软件包。 1. apt命令是apt-get、apt-cache和apt-config中最常用命令选项的集合。它可以代替一些旧的apt-get命令。以下是一些apt常用的命令及其功能: - apt install package:用于安装软件包。 - apt remove package:用于移除软件包。 - apt purge package:用于移除软件包及其配置文件。 - apt update:用于刷新存储库索引。 - apt upgrade:用于升级所有可升级的软件包。 - apt autoremove:用于自动删除不需要的包。 - apt full-upgrade:用于在升级软件包时自动处理依赖关系。 - apt search keyword:用于搜索应用程序。 - apt show package:用于显示安装细节。 2. dpkg命令主要用于安装.deb文件,但不会解决模块的依赖关系,并且不涉及ubuntu软件仓库中的软件。以下是一些dpkg常用的命令及其功能: - dpkg -i package_name.deb:用于安装本地的.deb文件,不解决依赖关系。 - dpkg -r package:用于删除软件包。 3. pip命令是python安装时自带的工具,用于安装python相关的包。在Ubuntu中,可以使用pip3来安装python3的包。以下是一些pip常用的命令及其功能: - sudo apt-get install python3-pip:用于安装pip3。 - sudo pip3 install --upgrade pip:用于升级pip3。 - sudo pip3 install package:用于安装python相关的包。 总结起来,在Ubuntu中,可以使用apt命令来安装、升级和移除软件包,使用dpkg命令来安装本地的.deb文件,使用pip3命令来安装python相关的包。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *2* [ubuntu 安装命令](https://blog.csdn.net/qq_26913333/article/details/101448291)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] - *3* [简单记录一下ubuntu的一些安装指令](https://blog.csdn.net/hjxu2016/article/details/97145747)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值