ubuntu的快速安装与配置
文章目录
- 前言
- 一、快速安装
- 二 、基础配置
- 1 Sudo免密码
- 2 ubuntu20.04 pip更新源
- 3 安装和配置oneapi(infort/mpi/mkl) apt下载
- 第一次下载的要建立apt源
- apt下载(infort/mpi/mkl)
- 4 安装一些依赖库等
- 5 卸载WSL
- python
- 总结
前言
win11系统
ubuntu20.04
提示:以下是本篇文章正文内容,下面案例可供参考
一、快速安装

wsl.exe --list -o

wsl.exe --install Ubuntu-20.04

- 输入用户名和密码

二 、基础配置
1 Sudo免密码
- 给/etc/sudoers增加写的权限
gpasswd -a 用户名 sudo
- 添加信息
visudo

- 重新进入管理员模式
ctrl+x 直接退出
sudo -i
2 ubuntu20.04 pip更新源
cbb@qbchen:~/bin$ cd /etc/apt/
- 复制原本文件
cbb@qbchen:/etc/apt$ sudo cp -r sources.list sources.list.bak
cbb@qbchen:/etc/apt$ sudo vi sources.list
- 注意每个源的版本对应ubuntu的版本 不要选错了 我的是ubuntu20.04的版本
全部替换
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://mirrors.aliyun.com/ubuntu/ focal main restricted
# deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted## Major bug fix updates produced after the final release of the
## distribution.
deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted
# deb-src http://mirrors.aliyun.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://mirrors.aliyun.com/ubuntu/ focal universe
# deb-src http://mirrors.aliyun.com/ubuntu/ focal universe
deb http://mirrors.aliyun.com/ubuntu/ focal-updates universe
# deb-src http://mirrors.aliyun.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://mirrors.aliyun.com/ubuntu/ focal multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ focal multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-updates multiverse
# deb-src http://mirrors.aliyun.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://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
# deb-src http://mirrors.aliyun.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 partnerdeb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted
# deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted
deb http://mirrors.aliyun.com/ubuntu/ focal-security universe
# deb-src http://mirrors.aliyun.com/ubuntu/ focal-security universe
deb http://mirrors.aliyun.com/ubuntu/ focal-security multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ focal-security multiverse
# deb-src https://apt.repos.intel.com/oneapi all main
esc
:wq
- 更新源以及更新软件 如果报错没有权限 提升为管理员权限就好了
cbb@qbchen:/etc/apt$ apt update
cbb@qbchen:/etc/apt$ apt upgrade
3 安装和配置oneapi(infort/mpi/mkl) apt下载
- 官网:https://www.intel.com/content/www/us/en/developer/tools/oneapi/base-toolkit-download.html?operatingsystem=linux&distributions=aptpackagemanager
第一次下载的要建立apt源
root@qbchen:sudo -iroot@qbchen:~# ls
intelroot@qbchen:~# cd /etc/apt/root@qbchen:/etc/apt# ls
apt.conf.d auth.conf.d preferences.d sources.list sources.list.bak sources.list.d trusted.gpg.droot@qbchen:/etc/apt# cd sources.list.d/
root@qbchen:/etc/apt/sources.list.d# wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \ | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null--2023-03-07 15:03:04-- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
Resolving apt.repos.intel.com (apt.repos.intel.com)... 104.71.139.144, 2600:1417:8000:b86::4b23, 2600:1417:8000:b92::4b23
Connecting to apt.repos.intel.com (apt.repos.intel.com)|104.71.139.144|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3796 (3.7K) [binary/octet-stream]
Saving to: ‘STDOUT’- 100%[=================================================>] 3.71K --.-KB/s in 0s2023-03-07 15:03:05 (616 MB/s) - written to stdout [3796/3796]--2023-03-07 15:03:05-- http://%20/
Resolving ( )... failed: Name or service not known.
wget: unable to resolve host address ‘ ’
FINISHED --2023-03-07 15:03:05--
Total wall clock time: 1.0s
Downloaded: 1 files, 3.7K in 0s (616 MB/s)
root@qbchen:/etc/apt/sources.list.d# lsroot@qbchen:/etc/apt/sources.list.d# echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.listroot@qbchen:/etc/apt/sources.list.d# ls
oneAPI.listroot@qbchen:/etc/apt/sources.list.d# cat oneAPI.list
deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all mainroot@qbchen:/etc/apt/sources.list.d# apt update
更新出apt里面的包 就算建立完成

apt下载(infort/mpi/mkl)
- 下载
root@qbchen:~# apt install intel-oneapi-mkl intel-oneapi-mpi intel-oneapi-compiler intel-oneapi-compiler-fortran
- 查看ifx icc ifort 看到这几个文件存在 说明安装完成
root@qbchen:~# cd /opt/intel/oneapi/compiler/latest/linux/bin
root@qbchen:/opt/intel/oneapi/compiler/latest/linux/bin# ls
aocl-ioc64 fpp icx-cc icx-cl icx.cfg ifx ifx.cfg intel64 ioc64 sycl-ls sycl-post-link
root@qbchen:/opt/intel/oneapi/compiler/latest/linux/bin# cd intel64/
root@qbchen:/opt/intel/oneapi/compiler/latest/linux/bin/intel64# ls
codecov fpp ifort.cfg map_opts profmerge proforder xiar xild
fortcom ifort libcilkrts.so.5 profdcg profmergesampling tselect xiar.cfg xild.cfg

- 配置环境变量
root@qbchen:/opt/intel/oneapi/compiler/latest/linux/bin/intel64# vi /etc/profile.d/intel.sh
输入以下内容
oaroot=/opt/intel/oneapi
source $oaroot/mkl/latest/env/vars.sh
source $oaroot/mpi/latest/env/vars.sh
source $oaroot/compiler/latest/env/vars.sh
root@qbchen:/opt/intel/oneapi/compiler/latest/linux/bin/intel64# . /etc/profile.d/intel.sh
- 安装成功
root@qbchen:/opt/intel/oneapi/compiler/latest/linux/bin/intel64# ifortifort: command line error: no files specified; for help type "ifort -help"
4 安装一些依赖库等
apt install build-essential
apt install cmake
5 卸载WSL
- 打开cmd
- 查看版本号
wsl --list
- 注销ubuntu
wsl --unregister <你的ubuntu的版本号>
- win系统卸载

python
- ubuntu20.04默认装了python 名字叫python3 默认在/usr/bin
指向usr/lib目录下面的python3.8

总结
相关文章:
ubuntu的快速安装与配置
文章目录前言一、快速安装二 、基础配置1 Sudo免密码2 ubuntu20.04 pip更新源3 安装和配置oneapi(infort/mpi/mkl) apt下载第一次下载的要建立apt源apt下载(infort/mpi/mkl)4 安装一些依赖库等5 卸载WSLpython总结前言 win11系统 ubuntu20.04 提示:以下…...
人工智能AI工具汇总(AIGC ChatGPT时代个体崛起)
NameCategoryWebsiteDescription描述《AIGC时代:超级个体的崛起》小报童https://xiaobot.net/p/SuperIndividual 介绍AIGC,ChatGPT,使用技巧与搞钱方式。Masterpiece Studio3Dhttps://masterpiecestudio.comSimplifying 3D Creation with AI…...
【rust-grpc-proxy】在k8s中,自动注入代理到pod中,再不必为grpc调试而烦恼
目录前言原理sidecarwebhook实现安装k8s设置webhook使用尾语前言 rust-grpc-proxy 目前功能基本完善。是时候上环境开始应用了。 之前考虑是gateway模式或者sidecar模式。 思考良久之后,觉得两种模式都有使用场景,那就都支持。本次就带来sidecar模式的食…...
VisualStudio2022制作多项目模板及Vsix插件
一、安装工作负载 在vs2022上安装“visual studio扩展开发 ”工作负载 二、制作多项目模板 导出项目模板这个我就不再多说了(项目→导出模板→选择项目模板,选择要导出的项目→填写模板信息→完成)。 1.准备模板文件 将解决方案中的多个…...
仿写简单IOC
目录 TestController类: UserService类: 核心代码SpringIOC: Autowired和Component注解 SpringIOCTest 类 编辑 总结: TestController类: Component public class TestController {Autowiredprivate UserService userService;public void test…...
liunx下安装node exporter
1 建立文件夹 cd /opt mkdir software 下载最新的包,并解压 https://prometheus.io/download/ 下载 curl -LO https://github.com/prometheus/node_exporter/releases/download/v0.18.1/node_exporter-0.18.1.linux-amd64.tar.gz 3.解压 tar -xvf node_exporter-0.…...
lambda函数
Lambda(函数指针)lambda 是c11非常重要也是最常用的特性之一,他有以下优点:可以就地匿名定义目标函数或函数对象,不需要额外写一个函数lambda表达式是一个匿名的内联函数lambda表达式定义了一个匿名函数,语法如下:[cap…...
【Python入门第二十七天】Python 日期
Python 日期 Python 中的日期不是其自身的数据类型,但是我们可以导入名为 datetime 的模块,把日期视作日期对象进行处理。 实例 导入 datetime 模块并显示当前日期: import datetimex datetime.datetime.now() print(x)运行实例 2023-0…...
C++基础知识【5】数组和指针
目录 一、概述 数组 指针 二、数组 2.1、数组的声明 2.2、数组的初始化 2.3、数组的访问 2.4、多维数组 2.5、数组作为函数参数 三、指针 3.1、指针的声明 3.2、指针的赋值 3.3、指针的访问 3.4、指针运算 3.5、指针数组和数组指针 3.6、二级指针 四、数组和指…...
Vim使用操作命令笔记
Vim使用操作命令笔记在普通模式下,输入 : help tutor 就可以进入vim的教学 在 terminal 中输入 vim 文件名 就可以打开文件 vim有两种模式 normal mode (普通模式)→ 指令操作 insert mode (输入模式&…...
【论文阅读】Robust Multi-Instance Learning with Stable Instances
1、摘要与引言 以往的MIL算法遵循i.i.d假设:训练样本与测试样本都分别来自于同一分布中,而这一假设往往与现实应用中有所出入。研究人员通过计算训练样本与测试样本之间的密度比对训练样本进行加权,以解决分布变化带来的问题。 分布的变化发…...
洛谷 P5116 [USACO18DEC]Mixing Milk B
题目链接:P5116 [USACO18DEC]Mixing Milk B - 洛谷 | 计算机科学教育新生态 (luogu.com.cn) 题目描述 农业,尤其是生产牛奶,是一个竞争激烈的行业。Farmer John 发现如果他不在牛奶生产工艺上有所创新,他的乳制品生意可能就会受…...
华为OD机试 - 最左侧冗余覆盖子串(C 语言解题)【独家】
最近更新的博客 华为od 2023 | 什么是华为od,od 薪资待遇,od机试题清单华为OD机试真题大全,用 Python 解华为机试题 | 机试宝典【华为OD机试】全流程解析+经验分享,题型分享,防作弊指南)华为od机试,独家整理 已参加机试人员的实战技巧文章目录 使用说明本期题目:最左侧冗…...
实验7 图像水印
本次实验大部分素材来源于山大王成优老师的讲义以及冈萨雷斯(MATLAB版),仅作个人学习笔记使用,禁止用作商业目的。 文章目录一、实验目的二、实验例题1. 数字图像水印技术2. 可见水印的嵌入3. 不可见脆弱水印4. 不可见鲁棒水印一、…...
如何实现大文件断点续传、秒传
大家先来了解一下几个概念: 「文件分块」:将大文件拆分成小文件,将小文件上传\下载,最后再将小文件组装成大文件; 「断点续传」:在文件分块的基础上,将每个小文件采用单独的线程进行上传\下载&…...
备战蓝桥python——完全平方数
完全平方数 链接: 完全平方数 暴力解法: n int(input()) for i in range(1, n1):if(((i*n)**0.5)%10.0):print(i)break运用数论相关知识求解 任意一个正整数都可以被分解成若干个质数乘积的形式,例如 :2022∗5120 \ 2^{2}*5^{1}\,20 22∗51 由此…...
WebRTC中的NAT穿透
NAT简介 我们知道,WebRTC会按照内网、P2P、中转的顺序来尝试连接。在大部分的情况下,实际是使用P2P或者中转的。这里P2P的场景主要使用的技术就是NAT穿透。 我们先简单了解下NAT。NAT在真实网络中是常见的,它的出现一是为了解决ipv4地址不够…...
SpringCloud-高级篇(一)
目录: (1)初识Sentinel-雪崩问题的解决方案 (2)服务保护Sentinel和Hystrix对比 (3)Sentinel初始-安转控制台 (4)整合微服务和Sentinel 微服务高级篇 (1&…...
电脑自动重启是什么原因?详细解说
案例:电脑自动重启是什么原因? “一台用了一年的电脑,最近使用,每天都会一两次莫名其妙自动重启,看了电脑错误日志,看不懂什么意思,一直找不到答案。有没有高手知道怎么解决这个问题的。” 当…...
通过Wrangler CLI在worker中创建数据库和表
官方使用文档:Getting started Cloudflare D1 docs 创建数据库 在命令行中执行完成之后,会在本地和远程创建数据库: npx wranglerlatest d1 create prod-d1-tutorial 在cf中就可以看到数据库: 现在,您的Cloudfla…...
vscode(仍待补充)
写于2025 6.9 主包将加入vscode这个更权威的圈子 vscode的基本使用 侧边栏 vscode还能连接ssh? debug时使用的launch文件 1.task.json {"tasks": [{"type": "cppbuild","label": "C/C: gcc.exe 生成活动文件"…...
AtCoder 第409场初级竞赛 A~E题解
A Conflict 【题目链接】 原题链接:A - Conflict 【考点】 枚举 【题目大意】 找到是否有两人都想要的物品。 【解析】 遍历两端字符串,只有在同时为 o 时输出 Yes 并结束程序,否则输出 No。 【难度】 GESP三级 【代码参考】 #i…...
高防服务器能够抵御哪些网络攻击呢?
高防服务器作为一种有着高度防御能力的服务器,可以帮助网站应对分布式拒绝服务攻击,有效识别和清理一些恶意的网络流量,为用户提供安全且稳定的网络环境,那么,高防服务器一般都可以抵御哪些网络攻击呢?下面…...
全面解析各类VPN技术:GRE、IPsec、L2TP、SSL与MPLS VPN对比
目录 引言 VPN技术概述 GRE VPN 3.1 GRE封装结构 3.2 GRE的应用场景 GRE over IPsec 4.1 GRE over IPsec封装结构 4.2 为什么使用GRE over IPsec? IPsec VPN 5.1 IPsec传输模式(Transport Mode) 5.2 IPsec隧道模式(Tunne…...
企业如何增强终端安全?
在数字化转型加速的今天,企业的业务运行越来越依赖于终端设备。从员工的笔记本电脑、智能手机,到工厂里的物联网设备、智能传感器,这些终端构成了企业与外部世界连接的 “神经末梢”。然而,随着远程办公的常态化和设备接入的爆炸式…...
Spring是如何解决Bean的循环依赖:三级缓存机制
1、什么是 Bean 的循环依赖 在 Spring框架中,Bean 的循环依赖是指多个 Bean 之间互相持有对方引用,形成闭环依赖关系的现象。 多个 Bean 的依赖关系构成环形链路,例如: 双向依赖:Bean A 依赖 Bean B,同时 Bean B 也依赖 Bean A(A↔B)。链条循环: Bean A → Bean…...
免费数学几何作图web平台
光锐软件免费数学工具,maths,数学制图,数学作图,几何作图,几何,AR开发,AR教育,增强现实,软件公司,XR,MR,VR,虚拟仿真,虚拟现实,混合现实,教育科技产品,职业模拟培训,高保真VR场景,结构互动课件,元宇宙http://xaglare.c…...
篇章一 论坛系统——前置知识
目录 1.软件开发 1.1 软件的生命周期 1.2 面向对象 1.3 CS、BS架构 1.CS架构编辑 2.BS架构 1.4 软件需求 1.需求分类 2.需求获取 1.5 需求分析 1. 工作内容 1.6 面向对象分析 1.OOA的任务 2.统一建模语言UML 3. 用例模型 3.1 用例图的元素 3.2 建立用例模型 …...
Tableau for mac 驱动
Tableau 驱动程序安装指南 对于希望在 Mac OS 上使用 Tableau 进行数据分析的用户来说,确保正确安装相应的驱动程序至关重要。Tableau 支持多种数据库连接方式,并提供官方文档指导如何设置这些连接。 安装适用于 Mac 的 JDBC 或 ODBC 驱动程序 为了使…...
