AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / unix / 问题

全部问题(unix)

Martin Hope
Vlastimil Burián
Asked: 2019-12-13 14:09:40 +0800 CST

模块 i915 可能缺少固件 /lib/firmware/i915/*

  • 93

每次我在运行GNU/Linux Debian Buster 10. 0的 Dell PowerEdge T20 服务器上更新我的initramfs映像(-s)时都会收到这些警告。有解决办法吗?update-initramfs


W: Possible missing firmware /lib/firmware/i915/bxt_dmc_ver1_07.bin for module i915
W: Possible missing firmware /lib/firmware/i915/skl_dmc_ver1_27.bin for module i915
W: Possible missing firmware /lib/firmware/i915/kbl_dmc_ver1_04.bin for module i915
W: Possible missing firmware /lib/firmware/i915/cnl_dmc_ver1_07.bin for module i915
W: Possible missing firmware /lib/firmware/i915/glk_dmc_ver1_04.bin for module i915
W: Possible missing firmware /lib/firmware/i915/kbl_guc_ver9_39.bin for module i915
W: Possible missing firmware /lib/firmware/i915/bxt_guc_ver9_29.bin for module i915
W: Possible missing firmware /lib/firmware/i915/skl_guc_ver9_33.bin for module i915
W: Possible missing firmware /lib/firmware/i915/kbl_huc_ver02_00_1810.bin for module i915
W: Possible missing firmware /lib/firmware/i915/bxt_huc_ver01_07_1398.bin for module i915
W: Possible missing firmware /lib/firmware/i915/skl_huc_ver01_07_1398.bin for module i915
debian initramfs
  • 3 个回答
  • 162293 Views
Martin Hope
Zhro
Asked: 2019-09-15 16:57:25 +0800 CST

记住 ln 参数顺序的提示?

  • 82

多年来我一直ln在编写符号链接,但我仍然把参数的顺序弄错了。

这通常让我写:

ln -s a b

然后看着输出提醒自己。

我总是想像a -> b我读到的那样,而实际上恰恰相反b -> a。这感觉违反直觉,所以我发现我总是在怀疑自己。

有没有人有任何提示可以帮助我记住正确的顺序?

symlink ln
  • 14 个回答
  • 7526 Views
Martin Hope
Wong Jia Hau
Asked: 2018-08-24 23:28:13 +0800 CST

ssh-add 返回:“连接代理时出错:没有这样的文件或目录”

  • 92

ssh-add单独是行不通的:

Error connecting to agent: No such file or directory

我应该如何使用该工具?

linux ssh
  • 4 个回答
  • 142554 Views
Martin Hope
Timothy Pulliam
Asked: 2018-08-17 10:00:46 +0800 CST

Bash 抛出错误,第 8 行:$1: unbound variable

  • 78

我正在尝试学习如何使用 getopts,以便我可以拥有带有解析输入的脚本(尽管我认为 getopts 可能会更好)。我正在尝试编写一个简单的脚本来返回分区使用百分比。问题是我的一个 bash 函数似乎不喜欢我$1在函数中作为变量引用。我引用的原因$1是因为该get_percent函数可以传递一个挂载点作为可选参数来显示,而不是所有的挂载点。

剧本

#!/usr/bin/bash

set -e
set -u
set -o pipefail

get_percent(){
    if [ -n "$1" ] 
    then
        df -h $1 | tail -n +2 | awk '{ print $1,"\t",$5 }'
    else
        df -h | tail -n +2 | awk '{ print $1,"\t",$5 }'
    fi
}

usage(){
    echo "script usage: $(basename $0) [-h] [-p] [-m mount_point]" >&2
}

# If the user doesn't supply any arguments, we run the script as normal
if [ $# -eq 0 ];
then
    get_percent
    exit 0
fi
# ...

输出

$ bash thing.sh
thing.sh: line 8: $1: unbound variable

$ bash -x thing.sh
+ set -e
+ set -u
+ set -o pipefail
+ '[' 0 -eq 0 ']'
+ get_percent
thing.sh: line 8: $1: unbound variable
bash shell-script
  • 5 个回答
  • 155048 Views
Martin Hope
leeand00
Asked: 2018-05-09 22:31:19 +0800 CST

$() 是一个子shell吗?

  • 76

我理解子shell语法是(<commands...>),$()只是一个可以从中检索变量值的子shell?

注意:这适用于 bash 4.4,基于其文档中的不同措辞。

bash subshell
  • 3 个回答
  • 22859 Views
Martin Hope
Piotr Dobrogost
Asked: 2018-05-09 09:01:24 +0800 CST

如何配置 systemd-resolved 和 systemd-networkd 以使用本地 DNS 服务器来解析本地域和远程 DNS 服务器来解析远程域?

  • 76

我通过网关连接到局域网并访问 Internet。本地网络中有 DNS 服务器,能够解析本地网络中计算机的主机名。

我想配置systemd-resolved和systemd-networkd以便本地主机名的查找请求将专门定向(路由)到本地 DNS 服务器,而对所有其他主机名的查找请求将专门定向到另一个远程 DNS 服务器。

假设我不知道配置文件在哪里,或者我是否应该添加更多文件并要求在答案中指定它们的路径。

linux systemd
  • 3 个回答
  • 162043 Views
Martin Hope
Rodrigo
Asked: 2018-04-30 20:07:43 +0800 CST

如何卸载内核模块“nvidia-drm”?

  • 82

我正在尝试在 Debian Stretch 中安装最新的 NVIDIA 驱动程序。我已经NVIDIA-Linux-x86_64-390.48.run从这里下载了,但是当我尝试做

sudo sh ./NVIDIA-Linux-x86_64-390.48.run

按照建议,会出现一条错误消息。

ERROR: An NVIDIA kernel module 'nvidia-drm' appears to already be loaded in your kernel.  This may be because it is in use (for example, by an X server, a CUDA program, or 
         the NVIDIA Persistence Daemon), but this may also happen if your kernel was configured without support for module unloading.  Please be sure to exit any programs    
         that may be using the GPU(s) before attempting to upgrade your driver.  If no GPU-based programs are running, you know that your kernel supports module unloading,   
         and you still receive this message, then an error may have occured that has corrupted an NVIDIA kernel module's usage count, for which the simplest remedy is to     
         reboot your computer.

当我试图找出谁在使用nvidia-drm(或nvidia_drm)时,我什么也看不到。

~$ sudo lsof | grep nvidia-drm
lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs
      Output information may be incomplete.
~$ sudo lsof -e /run/user/1000/gvfs | grep nvidia-drm
~$

当我尝试删除它时,它说它正在被使用。

~$ sudo modprobe -r nvidia-drm
modprobe: FATAL: Module nvidia_drm is in use.
~$ 

我已经重新启动并以纯文本模式启动(通过在提供用户名/密码之前按 Ctrl+Alt+F2),但我得到了同样的错误。

除此之外,我如何“知道我的内核支持模块卸载”?

我在启动时收到了一些与 nvidia 相关的警告,但不知道它们是否相关:

Apr 30 00:46:15 debian-9 kernel: nvidia: loading out-of-tree module taints kernel.
Apr 30 00:46:15 debian-9 kernel: nvidia: module license 'NVIDIA' taints kernel.
Apr 30 00:46:15 debian-9 kernel: Disabling lock debugging due to kernel taint
Apr 30 00:46:15 debian-9 kernel: NVRM: loading NVIDIA UNIX x86_64 Kernel Module  375.82  Wed Jul 19 21:16:49 PDT 2017 (using threaded interrupts)
debian kernel
  • 13 个回答
  • 158676 Views
Martin Hope
gmile
Asked: 2018-03-08 03:26:19 +0800 CST

具有奇怪随机名称的进程会消耗大量网络和 CPU 资源。有人在黑我吗?

  • 75

在云提供商的虚拟机中,我看到一个带有奇怪随机名称的进程。它消耗大量的网络和 CPU 资源。

从视图来看,该过程如下所示pstree:

systemd(1)───eyshcjdmzg(37775)─┬─{eyshcjdmzg}(37782)
                               ├─{eyshcjdmzg}(37783)
                               └─{eyshcjdmzg}(37784)

我使用strace -p PID. 这是我得到的输出:https ://gist.github.com/gmile/eb34d262012afeea82af1c21713b1be9 。

杀死进程不起作用。它以某种方式(通过systemd?)复活了。这是从 systemd 的角度来看它的样子(注意底部奇怪的 IP 地址):

$ systemctl status 37775
● session-60.scope - Session 60 of user root
   Loaded: loaded
Transient: yes
  Drop-In: /run/systemd/system/session-60.scope.d
           └─50-After-systemd-logind\x2eservice.conf, 50-After-systemd-user-sessions\x2eservice.conf, 50-Description.conf, 50-SendSIGHUP.conf, 50-Slice.conf, 50-TasksMax.conf
   Active: active (abandoned) since Tue 2018-03-06 10:42:51 EET; 1 day 1h ago
    Tasks: 14
   Memory: 155.4M
      CPU: 18h 56min 4.266s
   CGroup: /user.slice/user-0.slice/session-60.scope
           ├─37775 cat resolv.conf
           ├─48798 cd /etc
           ├─48799 sh
           ├─48804 who
           ├─48806 ifconfig eth0
           ├─48807 netstat -an
           ├─48825 cd /etc
           ├─48828 id
           ├─48831 ps -ef
           ├─48833 grep "A"
           └─48834 whoami

Mar 06 10:42:51 k8s-master systemd[1]: Started Session 60 of user root.
Mar 06 10:43:27 k8s-master sshd[37594]: Received disconnect from 23.27.74.92 port 59964:11:
Mar 06 10:43:27 k8s-master sshd[37594]: Disconnected from 23.27.74.92 port 59964
Mar 06 10:43:27 k8s-master sshd[37594]: pam_unix(sshd:session): session closed for user root

到底是怎么回事?!

centos systemd
  • 2 个回答
  • 19778 Views
Martin Hope
Bagas Sanjaya
Asked: 2017-12-20 05:48:21 +0800 CST

为什么 Linux 使用 LF 作为换行符?

  • 92

据我所知,每个操作系统都有不同的方式来标记行尾 (EOL) 字符。商业操作系统对 EOL 使用回车(Windows 上的回车和换行,Mac 上只有回车)。另一方面,Linux 仅对 EOL 使用换行符。

为什么 Linux 不使用 EOL 的回车(而只使用换行符)?

files history
  • 4 个回答
  • 24496 Views
Martin Hope
showkey
Asked: 2017-12-03 02:15:02 +0800 CST

如何下载软件包而不是使用 apt-get 命令安装它?

  • 77
sudo apt-get install pppoe

将下载pppoe包并安装它。

是否可以只下载pppoe软件包而不使用apt-get命令安装它?

wget http://ftp.us.debian.org/debian/pool/main/p/ppp/ppp_2.4.7-1+4_amd64.deb

ppp_2.4.7-1+4_amd64.deb 现在在当前目录中。

cd  /tmp
sudo  apt-get install  -d  ppp
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  ppp
0 upgraded, 1 newly installed, 0 to remove and 95 not upgraded.
Need to get 0 B/346 kB of archives.
After this operation, 949 kB of additional disk space will be used.
Download complete and in download only mode

/tmp 中没有 ppp_2.4.7-1+4_amd64.deb或 ppp 相关的包。

sudo  find  /tmp  -name  ppp*

什么都没找到。

/tmp 中带有命令的包 ppp 在哪里

cd  /tmp
sudo  apt-get install  -d  ppp

??

apt download
  • 7 个回答
  • 181743 Views
上一页
下一页

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    模块 i915 可能缺少固件 /lib/firmware/i915/*

    • 3 个回答
  • Marko Smith

    无法获取 jessie backports 存储库

    • 4 个回答
  • Marko Smith

    如何将 GPG 私钥和公钥导出到文件

    • 4 个回答
  • Marko Smith

    我们如何运行存储在变量中的命令?

    • 5 个回答
  • Marko Smith

    如何配置 systemd-resolved 和 systemd-networkd 以使用本地 DNS 服务器来解析本地域和远程 DNS 服务器来解析远程域?

    • 3 个回答
  • Marko Smith

    dist-upgrade 后 Kali Linux 中的 apt-get update 错误 [重复]

    • 2 个回答
  • Marko Smith

    如何从 systemctl 服务日志中查看最新的 x 行

    • 5 个回答
  • Marko Smith

    Nano - 跳转到文件末尾

    • 8 个回答
  • Marko Smith

    grub 错误:你需要先加载内核

    • 4 个回答
  • Marko Smith

    如何下载软件包而不是使用 apt-get 命令安装它?

    • 7 个回答
  • Martin Hope
    user12345 无法获取 jessie backports 存储库 2019-03-27 04:39:28 +0800 CST
  • Martin Hope
    Carl 为什么大多数 systemd 示例都包含 WantedBy=multi-user.target? 2019-03-15 11:49:25 +0800 CST
  • Martin Hope
    rocky 如何将 GPG 私钥和公钥导出到文件 2018-11-16 05:36:15 +0800 CST
  • Martin Hope
    Evan Carroll systemctl 状态显示:“状态:降级” 2018-06-03 18:48:17 +0800 CST
  • Martin Hope
    Tim 我们如何运行存储在变量中的命令? 2018-05-21 04:46:29 +0800 CST
  • Martin Hope
    Ankur S 为什么 /dev/null 是一个文件?为什么它的功能不作为一个简单的程序来实现? 2018-04-17 07:28:04 +0800 CST
  • Martin Hope
    user3191334 如何从 systemctl 服务日志中查看最新的 x 行 2018-02-07 00:14:16 +0800 CST
  • Martin Hope
    Marko Pacak Nano - 跳转到文件末尾 2018-02-01 01:53:03 +0800 CST
  • Martin Hope
    Kidburla 为什么真假这么大? 2018-01-26 12:14:47 +0800 CST
  • Martin Hope
    Christos Baziotis 在一个巨大的(70GB)、一行、文本文件中替换字符串 2017-12-30 06:58:33 +0800 CST

热门标签

linux bash debian shell-script text-processing ubuntu centos shell awk ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve