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&…...

电脑自动重启是什么原因?详细解说
案例:电脑自动重启是什么原因? “一台用了一年的电脑,最近使用,每天都会一两次莫名其妙自动重启,看了电脑错误日志,看不懂什么意思,一直找不到答案。有没有高手知道怎么解决这个问题的。” 当…...

2023美国大学生数学建模竞赛E题思路
problem 背景: 光污染用于描述过度或不良使用人造光。我们称之为光污染的一些现象包括光侵入、过度照明和光杂波。在大城市,太阳落山后,这些现象最容易在天空中看到:然而,它们也可能发生在更偏远的地区。 光污染会改变我们对夜空…...

蓝桥杯三月刷题 第五天
文章目录💥前言😉解题报告💥数的分解🤔一、思路:😎二、代码:💥前言 上午没写,下午写了会被朋友拉出去耍,被冷风吹到了,而且被他坑了,根本没有玩骑…...

Echarts 水波图实现
开发的项目中需要实现这样一个水波图,例如下图在echarts官网中找了很久没找到,后面是在Echarts社区中找到的,实现了大部分的样式,但是还有一些数据的展示没有实现。水波图的数值展示是默认整数百分比,我的需求是需要保…...

逻辑优化基础-shannon decomposition
1. 简介 在逻辑综合中,香农分解(Shannon decomposition)是一种常用的布尔函数分解方法。它将一个布尔函数分解为两个子函数的和,其中每个子函数包含一个布尔变量的取反和非取反的部分。 具体来说,假设对于一个布尔函…...

Java中线程池的创建与使用
前言:默认线程池的弊端在线程池应用中,参考阿里巴巴java开发规范:线程池不允许使用Executors去创建,不允许使用系统默认的线程池,推荐通过ThreadPoolExecutor的方式,这样的处理方式让开发的工程师更加明确&…...

关于HashMap与OkHttp的使用
写了一个okhttp的post请求方法,添加参数很麻烦,需要封装: //post请求public static void sendOkHttpRequestPost(String address , Callback callback) {OkHttpClient client new OkHttpClient();// 创建表单参数RequestBodyRequestBody fo…...

华为OD机试 - 单词倒序(C 语言解题)【独家】
最近更新的博客 华为od 2023 | 什么是华为od,od 薪资待遇,od机试题清单华为OD机试真题大全,用 Python 解华为机试题 | 机试宝典【华为OD机试】全流程解析+经验分享,题型分享,防作弊指南)华为od机试,独家整理 已参加机试人员的实战技巧文章目录 使用说明本期题目:单词倒序…...

搭建Samba服务器
搭建Samba服务器 文章目录搭建Samba服务器samba安装安装命令配置-ubuntu侧为samba服务器创建一个共享目录share创建使用该共享文件夹的账号修改samba服务器配置文件重启samba服务windows创建映射1.点击映射网络驱动器2.输入Ubuntu中的ip地址及其用户信息3.输入用户信息及其密码…...

Matlab进阶绘图第5期—风玫瑰图(WindRose)
风玫瑰图(Wind rose diagram)是一种特殊的极坐标堆叠图/统计直方图,其能够直观地表示某个地区一段时期内风向、风速的发生频率。 风玫瑰图在建筑规划、环保、风力发电、消防、石油站设计、海洋气候分析等领域都有重要作用,所以在一些顶级期刊中也能够看…...

【SQL开发实战技巧】系列(二十四):数仓报表场景☞通过执行计划详解”行转列”,”列转行”是如何实现的
系列文章目录 【SQL开发实战技巧】系列(一):关于SQL不得不说的那些事 【SQL开发实战技巧】系列(二):简单单表查询 【SQL开发实战技巧】系列(三):SQL排序的那些事 【SQL开发实战技巧…...