Ubuntu 安装源及初始配置

一、 配置常用 Ubuntu 安装的阿里源:

% cd /etc/apt % sudo vi sources.list  % sudo apt update  deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse  deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse  deb http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse 

二、安装以下常用工具

  1. 安装 ssh,ifconfig 等常用网络软件
% sudo apt install net-tools ssh 
  1. 安装 gcc 等常用开发库
% sudo apt install build-essential 

三、常用配置命令

  1. 添加用户及设置
% useradd [用户名] % sudo vi /etc/group  % sudo vi /etc/sudoers  %sudo ALL=(ALL:ALL) NOPASSWD:ALL [用户名] ALL=(ALL:ALL) NOPASSWD:ALL 
  1. 设置远程操作
 % sudo systemctl set-default multi-user.target  % sudo systemctl set-default graphical.target 

2.1 合上笔记本盖子不休眠,取消 #HandleLidSwitch=suspend注释(即删除#号),然后将suspend改为ignore:

% sudo vi /etc/systemd/logind.conf HandleLidSwitch=ignore 

重启服务:

% sudo service systemd-logind restart 

2.2 安装远程 vnc

% sudo apt install vino dconf-editor     
% gsettings set org.gnome.desktop.interface enable-animations false 
  1. GPU 显示器安装

Nvidia GPU 安装

% sudo ./NVIDIA-Linux-x86_64-510.85.02.run -z --dkms --no-opengl-files --no-cc-version-check 

原文链接:https://blog.csdn.net/weixin_45750721/article/details/128694231

© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享