Ubuntu

I can't use the npm command on Windows 10 with WSL2 ON (ubuntu terminal)

耗尽温柔 提交于 2021-01-24 12:22:20
问题 I'm trying to get the npm command to work but it doesn't want to. As i said in the title, I'm using the windows WSL2. I already have installed nodejs with Git Bash a long time ago but now I need it to work on my ubuntu terminal. How could I fix this issue? My ubuntu terminal: root@DESKTOP-U2RC2DU:~# node -v v10.19.0 root@DESKTOP-U2RC2DU:~# npm -bash: /mnt/c/Program Files/nodejs/npm: /bin/sh^M: bad interpreter: No such file or directory root@DESKTOP-U2RC2DU:~# 回答1: Check your path in WSL. If

I can't use the npm command on Windows 10 with WSL2 ON (ubuntu terminal)

浪子不回头ぞ 提交于 2021-01-24 12:22:20
问题 I'm trying to get the npm command to work but it doesn't want to. As i said in the title, I'm using the windows WSL2. I already have installed nodejs with Git Bash a long time ago but now I need it to work on my ubuntu terminal. How could I fix this issue? My ubuntu terminal: root@DESKTOP-U2RC2DU:~# node -v v10.19.0 root@DESKTOP-U2RC2DU:~# npm -bash: /mnt/c/Program Files/nodejs/npm: /bin/sh^M: bad interpreter: No such file or directory root@DESKTOP-U2RC2DU:~# 回答1: Check your path in WSL. If

How to restore default ~/.bashrc ubuntu

泪湿孤枕 提交于 2021-01-24 10:50:27
问题 I messed up my ~/.bashrc file and am trying to restore it. I tried doing this: cp ~/.bashrc ~/.bashrc_bak cp /etc/skel/.bashrc ~/ source .bashrc but I get this error: cp: /etc/skel/.bashrc: No such file or directory I looked in /etc but there's no skel file there. I'm a complete beginner. Thanks for your help. 回答1: Type the following in your terminal, /bin/cp /etc/skel/.bashrc ~/ It will replace your corrupt ~/.bashrc with a fresh one. After that you need to source the ~/.bashrc so that the

Linux常用命令

痴心易碎 提交于 2021-01-24 10:30:31
Linux常用命令 在经过一天的学习之后,当然少不了对知识的总结, 以下便是我对今天我所学习的内容进行一个概要素的总结吧。 学习目标 说出Linux下的目录结构和常见的目录的的作用 熟练使用Linux下的相对路径和绝对路径 熟练使用Linux下常用文件和目录操作相关的命令 熟练使用修改用户权限、用户和用户组相关的命令 熟练使用文件的查找和检索的相关命令 熟练掌握Ubuntu下的软件安装和卸载 熟练使用压缩工具完成文件或目录的压缩和解压 命令解析器 shell 就是命令解析器 命令解析器的作用“对用户输入到终端的命令进行解析,调用对应的执行程序。 用户在终端输入命令 由shell命令解释器对命令进行解析解析成内核能够识别的指令 然后再由内核去执行命令 最终由终端显示命令的执行结果给用户 常用的命令解析器: shell – Bourne Shell /bin/sh bash – Bourne Again Shell /bin/bash 查看当前系统所使用的shell echo $SHELL 查看当前系统有哪些shell cat /etc/shells Linux下的目录结构 Linux系统的目录结构是一个树状结构 Linux下主要目录介绍 /bin:binary,二进制文件,可执行程序,shell命令 如: ls,rm,mv.cp等常用命令 /sbin:s--supervisor

Ubuntu怎么在Libreoffice中添加字体

时光怂恿深爱的人放手 提交于 2021-01-24 10:16:18
Libreoffice 官网提供了一些可供下载的字体 1. 在Libreoffice官网上下载字体 官网地址: https://zh-cn.libreoffice.org/download/fonts/ 。找到所需要的字体下载下来到Ubuntu本地。 2. 解压下载好的zip文件 可以直接使用可视化界面,右键进行解压。也可以使用命令行解压,命令如下: $ unzip SourceHanSerifCN.zip 3. 将解压缩的文件夹拷贝到 /usr/share/fonts/ $ sudo cp -r SourceHanSerifCN /usr/share/fonts/ 4. 进入到 /usr/share/fonts/ 目录,并更新字体缓存 $ cd /usr/share/fonts/ $ fc-cache -fv 5. 重启一下 Libreoffice 就可以看到新添加进去的字体 来源: oschina 链接: https://my.oschina.net/u/4306257/blog/4922051

ubuntu16 安装docker

我的未来我决定 提交于 2021-01-24 10:10:10
原文链接: ubuntu16 安装docker 参考 https://blog.csdn.net/bingzhongdehuoyan/article/details/79411479 开始安装 由于apt官方库里的docker版本可能比较旧,所以先卸载可能存在的旧版本: $ sudo apt-get remove docker docker-engine docker-ce docker.io 更新apt包索引: $ sudo apt-get update 安装以下包以使apt可以通过HTTPS使用存储库(repository): $ sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common 添加Docker官方的GPG密钥: $ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - 使用下面的命令来设置 stable 存储库: $ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

Make can't find curses.h

倾然丶 夕夏残阳落幕 提交于 2021-01-24 09:13:37
问题 I have this program called samtools (version 1.3) that is used for manipulating the files that you get from DNA sequencing experiments. The downloaded program is contained in a folder. To set the program up I enter that folder in the terminal (on an ubuntu computer). I enter the commando "make". it runs an prints what it does but terminates with the error message: bam_tview_curses.o bam_tview_curses.c bam_tview_curses.c:41:20: fatal error: curses.h: No such file or directory #include <curses

三、固件分析-固件提取

寵の児 提交于 2021-01-24 07:56:48
  上节初步介绍一些硬件基础知识和分析硬件所需要的基本工具,本篇将讲述利用编程器直接读取芯片固件的方法。 为了读取 Flash 芯片的内容,有以下两种常用方式: 1、直接将导线连接到芯片的引脚,在通过飞线连接编程器,进行在线读取固件; 2、把芯片拆焊下来,通过烧录座编程器,离线读取固件。 飞线法读取 通过夹具夹住芯片引脚,然后连接编程器读取芯片内容,通过编程器连接芯片需要注意引脚的顺序,在 IC 芯片上都会有一个小点,大多数情况下,小点对应的引脚即为芯片的第一脚,而连接编程器的导线也需要插入编程器上相应的引脚。 案例一:读取中控 F7 门禁固件 拆掉门禁外壳,通过电路图和芯片印字分析,在主板上有一颗 FM25F04A 存储芯片,通过夹具连接芯片到编程器,在通过专用编程器软件,对该芯片进行读取。 连接完成,确定引脚接线正确后,打开编程器对应软件,通过智能识别芯片ID,即可开始读取固件工作。 如无法识别,可根据印字说明,尝试类似的型号,一般情况下兼容。 点击读取,即可开始固件提取,成功之后会保存为 BIN 格式文件,打开即可看到 16 进制的内容,为下一步分析提供基础。 案例二:读取某智能摄像头固件 拆掉摄像头外壳,通过分析 PCB 上的各个 IC,找到 Flash 存储芯片。 在显微镜下,可以看到是一颗 25L64 型号的 Flash 芯片。 用夹具连接各引脚,并和编程器连接

Linux学习27-安装mysqlclient提示mysql_config not found问题

∥☆過路亽.° 提交于 2021-01-24 01:52:00
前言 Linux上使用pip 安装mysqlclient 时遇到报错 mysql_config not found 主要原因是缺少依赖包:mysql-devel 遇到问题 使用pip 安装 mysqlclient pip3 install mysqlclient 出现报错 /bin/sh: 1: mysql_config: not found Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-install-ixqbqcm3/mysqlclient/setup.py", line 17, in <module> metadata, options = get_config() File "/tmp/pip-install-ixqbqcm3/mysqlclient/setup_posix.py", line 44, in get_config libs = mysql_config("libs_r") File "/tmp/pip-install-ixqbqcm3/mysqlclient/setup_posix.py", line 26, in mysql_config raise EnvironmentError("%s not found" % (mysql

ubuntu中查看u盘的方法

一曲冷凌霜 提交于 2021-01-23 23:11:29
https://jingyan.baidu.com/article/a3aad71ae5e6bbb1fb009694.html 在某些情况下,U盘内的文件查看不到,像是被隐藏了,此时需要通过终端来操作,将U盘挂载到文件系统。挂载前需要知道U盘在Ubuntu系统内的磁盘名称,终端输入:sudo fdisk -l,可以看到设备名称为/dev/sdb1,大小29.8G,文件格式FAT32。 (也可以用df -h来查看挂载点信息) 挂载U盘,因为此处U盘只有一个分区,所以直接挂载/dev/sdb1即可(若移动存储设备有多个分区,可按分区挂载),终端输入:sudo mount /dev/sdb1 /mnt,这里将U盘的唯一分区挂载到/mnt目录下。 挂载成功后,即可在/mnt目录下查看到U盘内的文件,可以ls/cp/mv等等操作。 最后U盘使用完毕,需要用umount命令卸载,终端输入:sudo umount /mnt。(如果U盘内的文件有改动,在卸载前最后使用sync命令同步一下) PS:取消挂载时出现了umount: /mnt: device is busy,原因是因为有程序在使用 /mnt 目录,我们可以使用 fuser 命令查看挂载目录被哪些进程占用。fuser 可以显示出当前哪个程序在使用磁盘上的某个文件、挂载点、甚至 网络 端口,并给出程序进程的详细信息。运行以下命令 sudo