我似乎得到了每个 bash 命令的 strace 信息。我该如何阻止它?

我似乎得到了每个 bash 命令的 strace 信息。我该如何阻止它?

这是我在终端中输入 ls 时得到的结果:(当我以 root 身份登录时不会发生这种情况。仅当我是 js 用户时。

js@hp-suse-laptop:~$ ls
      7255:
      7255:     file=libselinux.so.1 [0];  needed by ls [0]
      7255:     file=libselinux.so.1 [0];  generating link map
      7255:       dynamic: 0x00007f860df90d30  base: 0x00007f860df69000   size: 0x000000000002aa88
      7255:         entry: 0x00007f860df70ba0  phdr: 0x00007f860df69040  phnum:                 10
      7255:
      7255:
      7255:     file=libcap.so.2 [0];  needed by ls [0]
      7255:     file=libcap.so.2 [0];  generating link map
      7255:       dynamic: 0x00007f860df67df8  base: 0x00007f860df61000   size: 0x0000000000007308
      7255:         entry: 0x00007f860df63330  phdr: 0x00007f860df61040  phnum:                  9
      7255:
      7255:
      7255:     file=libc.so.6 [0];  needed by ls [0]
      7255:     file=libc.so.6 [0];  generating link map
      7255:       dynamic: 0x00007f860df599e0  base: 0x00007f860dd9b000   size: 0x00000000001c5338
      7255:         entry: 0x00007f860ddc1e30  phdr: 0x00007f860dd9b040  phnum:                 12
      7255:
      7255:
      7255:     file=libpcre.so.1 [0];  needed by /lib64/libselinux.so.1 [0]
      7255:     file=libpcre.so.1 [0];  generating link map
      7255:       dynamic: 0x00007f860dd99de0  base: 0x00007f860dd03000   size: 0x0000000000097208
      7255:         entry: 0x00007f860dd051f0  phdr: 0x00007f860dd03040  phnum:                  9
      7255:
      7255:
      7255:     file=libdl.so.2 [0];  needed by /lib64/libselinux.so.1 [0]
      7255:     file=libdl.so.2 [0];  generating link map
      7255:       dynamic: 0x00007f860dd01cf0  base: 0x00007f860dcfe000   size: 0x0000000000004090
      7255:         entry: 0x00007f860dcff130  phdr: 0x00007f860dcfe040  phnum:                  9
      7255:
      7255:
      7255:     calling init: /lib64/libc.so.6
      7255:
      7255:
      7255:     calling init: /lib64/libdl.so.2
      7255:
      7255:
      7255:     calling init: /usr/lib64/libpcre.so.1
      7255:
      7255:
      7255:     calling init: /usr/lib64/libcap.so.2
      7255:
      7255:
      7255:     calling init: /lib64/libselinux.so.1
      7255:
      7255:
      7255:     initialize program: ls
      7255:
      7255:
      7255:     transferring control: ls
      7255:
bin/  Desktop/  Development/  Development.zip  Documents/  Downloads/  Music/  Pictures/  Public/  snap/  Templates/  Videos/
js@hp-suse-laptop:~$ 

答案1

这不是 strace 信息,看起来也不像 strace 信息。它正在调试动态链接器的输出。您得到它是因为LD_DEBUG环境变量已设置(可能为files)。看man 8 ld.so了解更多相关信息。您可以使用 来在给定的 shell 中停止它unset LD_DEBUG。如果新的 shell 有它,那么您需要在.bash_profile类似的文件中查找它。

相关内容