Wsl 学习记录1-Wsl 使用第一天(持续更新)

WSL

Windows Subsystem for Linux(简称WSL)是一个在Windows 10上能够运行原生Linux二进制可执行文件(ELF格式)的兼容层。它是由微软与Canonical公司合作开发,其目标是使纯正的Ubuntu、Debian等映像能下载和解压到用户的本地计算机,并且映像内的工具和实用工具能在此子系统上原生运行。

Ubuntu 中 /# 和~#的区别

root@ubuntu:/# 这个是根目录,对一般用户只读,root用户有所有权限
root@ubuntu:~# 这个是home目录,每个非root用户都会有自己的home目录

查看ubuntu版本

方法一:

cat /etc/issue 

方法二:

sudo lsb_release -a 

操作

粘贴

鼠标右键

返回上层文件夹

cd -

列出目录文件信息

长列表输出该目录下文件信息(注意这里的文件,不同于一般的文件,可能是目录、链接、设备文件等),每一行对应一个文件或目录

ls -l

结果

total 688
lrwxrwxrwx   1 root root      7 Apr 23  2020 bin -> usr/bin
drwxr-xr-x   2 root root   4096 Apr 23  2020 boot
drwxr-xr-x   8 root root   2720 Apr  9 08:32 dev
drwxr-xr-x  92 root root   4096 Apr  9 08:42 etc
drwxr-xr-x   3 root root   4096 Apr  1 09:49 home
-rwxr-xr-x   3 root root 632096 Feb 11 10:20 init
lrwxrwxrwx   1 root root      7 Apr 23  2020 lib -> usr/lib
lrwxrwxrwx   1 root root      9 Apr 23  2020 lib32 -> usr/lib32
lrwxrwxrwx   1 root root      9 Apr 23  2020 lib64 -> usr/lib64
lrwxrwxrwx   1 root root     10 Apr 23  2020 libx32 -> usr/libx32
drwx------   2 root root  16384 Apr 11  2019 lost+found
drwxr-xr-x   2 root root   4096 Apr 23  2020 media
drwxr-xr-x   6 root root   4096 Apr  1 09:48 mnt
drwxr-xr-x   2 root root   4096 Apr 23  2020 opt
dr-xr-xr-x 230 root root      0 Apr  9 08:32 proc
drwxr-xr-x   3 root root   4096 Apr  8 16:31 py
drwx------   3 root root   4096 Apr  9 19:06 root
drwxr-xr-x   8 root root    200 Apr  9 08:42 run
lrwxrwxrwx   1 root root      8 Apr 23  2020 sbin -> usr/sbin
drwxr-xr-x   2 root root   4096 Apr 10  2020 snap
drwxr-xr-x   2 root root   4096 Apr 23  2020 srv
dr-xr-xr-x  11 root root      0 Apr  9 08:32 sys
drwxrwxrwt   2 root root   4096 Apr  9 11:02 tmp
drwxr-xr-x  14 root root   4096 Apr 23  2020 usr
drwxr-xr-x  13 root root   4096 Apr 23  2020 var

打开文件

  1. 文本文件
gedit、more、cat、vim、less
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://archive.ubuntu.com/ubuntu/ focal main restricted
# deb-src http://archive.ubuntu.com/ubuntu/ focal main restricted

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

WSL 安装py3.6.2

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值