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
    • 最新
    • 标签
主页 / user-53750

Stephen Ostermiller's questions

Martin Hope
Stephen Ostermiller
Asked: 2018-11-08 12:46:52 +0800 CST

update-alternatives for sh 报告 bash 被使用,但我仍然得到破折号

  • 4

我刚刚从 Ubuntu 17.10 升级到 Ubuntu 18.10。

我将我的盒子配置为bash用作默认 shell 而不是默认的dash. 我已经通过以下sudo update-alternatives --config sh报告进行了此更改:

  Selection    Path            Priority   Status
------------------------------------------------------------
  0            /bin/dash        200       auto mode
* 1            /bin/bash        100       manual mode
  2            /bin/dash        200       manual mode

但是,/bin/sh仍然指向dash而不是指向bash。

实际上,在以前版本的 Ubuntu 上,我相信曾经指向/bin/sh -> /etc/alternatives/sh.

看起来最新的 Ubuntu 在升级过程中不再允许alternatives或sh至少破坏了替代方案。我从How Can I Make /bin/sh point to /bin/bash? 现在建议重新配置破折号。

为什么不再alternatives工作了?此更改记录在哪里?我在 Ubuntu 中使用 sh 的替代品至少三年了,而且在升级之前我从来没有遇到过它的问题。有许多指南建议,例如:https ://jwaghetti.blogspot.com/2015/09/sharing-dash-to-bash.html

bash sh dash-shell update-alternatives
  • 1 个回答
  • 3066 Views
Martin Hope
Stephen Ostermiller
Asked: 2017-05-17 04:22:12 +0800 CST

更新到 grub 2 后未重新启动到最新内核

  • 6

我习惯于从 apt 安装 ubuntu 核心更新,然后重新启动以获取最新内核。但是,此过程似乎无法在我的一台服务器上正常运行。内核 4.10.0-21 已安装,但机器似乎仅在重新启动时使用 4.10.0-20。

在对 grub2 的 apt 更新过程中,一个对话框询问我是否要链接我的旧 grub 配置。我选择了“不”。我认为这可能是问题的一部分。

更新 grub 似乎是做正确的事,它将最新的内核放在首位:

$ sudo update-grub
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.10.0-21-generic
Found initrd image: /boot/initrd.img-4.10.0-21-generic
Found linux image: /boot/vmlinuz-4.10.0-20-generic
Found initrd image: /boot/initrd.img-4.10.0-20-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
done

我的/etc/grub/default文件说内核 0 应该是默认值:

GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=3
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

我可以验证是否grub.cfg添加了内核:

$ grep menuentry /boot/grub/grub.cfg
...
    menuentry 'Ubuntu, with Linux 4.10.0-21-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.10.0-21-generic-advanced-6af3f559-58c5-4c56-b1c8-ffe02c700c97' {
    menuentry 'Ubuntu, with Linux 4.10.0-21-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.10.0-21-generic-recovery-6af3f559-58c5-4c56-b1c8-ffe02c700c97' {
    menuentry 'Ubuntu, with Linux 4.10.0-20-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.10.0-20-generic-advanced-6af3f559-58c5-4c56-b1c8-ffe02c700c97' {
    menuentry 'Ubuntu, with Linux 4.10.0-20-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.10.0-20-generic-recovery-6af3f559-58c5-4c56-b1c8-ffe02c700c97' {
...

$ grep -Poz "menuentry 'Ubuntu' (.|\n)*?\}" /boot/grub/grub.cfg
menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-6af3f559-58c5-4c56-b1c8-ffe02c700c97' {
    recordfail
    load_video
    gfxmode $linux_gfx_mode
    insmod gzio
    if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos1'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1'  6af3f559-58c5-4c56-b1c8-ffe02c700c97
    else
      search --no-floppy --fs-uuid --set=root 6af3f559-58c5-4c56-b1c8-ffe02c700c97
    fi
        linux   /boot/vmlinuz-4.10.0-21-generic root=UUID=6af3f559-58c5-4c56-b1c8-ffe02c700c97 ro  quiet splash $vt_handoff
    initrd  /boot/initrd.img-4.10.0-21-generic
}

内核文件实际上存在于磁盘上:

$ ls -l /boot/vmlinuz-4.10.0-21-generic
-rw------- 1 root root 7575312 Apr 28 06:41 /boot/vmlinuz-4.10.0-21-generic

如果它以某种方式损坏,我尝试重新安装它:

$ sudo apt-get install --reinstall linux-image-4.10.0-21-generic

dpkg 显示两个内核都已安装:

$ dpkg -l | grep ii | grep linux-image-[0-9].*-generic
ii  linux-image-4.10.0-20-generic               4.10.0-20.22                              amd64        Linux kernel image for version 4.10.0 on 64 bit x86 SMP
ii  linux-image-4.10.0-21-generic               4.10.0-21.23                              amd64        Linux kernel image for version 4.10.0 on 64 bit x86 SMP

但是重启后:

$ uname -r
4.10.0-20-generic

$ cat /proc/version 
Linux version 4.10.0-20-generic (buildd@lcy01-05) (gcc version 6.3.0 20170406 (Ubuntu 6.3.0-12ubuntu2) ) #22-Ubuntu SMP Thu Apr 20 09:22:42 UTC 2017

$ cat /proc/cmdline
root=UUID=6af3f559-58c5-4c56-b1c8-ffe02c700c97 ro quiet splash 

我真的认为 grub legacy 仍然在这台机器上使用。/boot/grub/menu.1st 引用了 20 但没有引用 21:

title           Ubuntu 17.04, kernel 4.10.0-20-generic
root            (hd0,0)
kernel          /boot/vmlinuz-4.10.0-20-generic root=UUID=6af3f559-58c5-4c56-b1c8-ffe02c700c97 ro quiet splash
initrd          /boot/initrd.img-4.10.0-20-generic
quiet

title           Ubuntu 17.04, kernel 4.10.0-20-generic (recovery mode)
root            (hd0,0)
kernel          /boot/vmlinuz-4.10.0-20-generic root=UUID=6af3f559-58c5-4c56-b1c8-ffe02c700c97 ro  single
initrd          /boot/initrd.img-4.10.0-20-generic

title           Ubuntu 17.04, kernel 4.8.0-49-generic
root            (hd0,0)
kernel          /boot/vmlinuz-4.8.0-49-generic root=UUID=6af3f559-58c5-4c56-b1c8-ffe02c700c97 ro quiet splash
initrd          /boot/initrd.img-4.8.0-49-generic
quiet

title           Ubuntu 17.04, kernel 4.8.0-49-generic (recovery mode)
root            (hd0,0)
kernel          /boot/vmlinuz-4.8.0-49-generic root=UUID=6af3f559-58c5-4c56-b1c8-ffe02c700c97 ro  single
initrd          /boot/initrd.img-4.8.0-49-generic

title           Ubuntu 17.04, memtest86+
root            (hd0,0)
kernel          /boot/memtest86+.bin
quiet

这台机器在数据中心,在重启过程中我没有控制台访问权限。我无法看到 grub 在重新启动期间所说的内容,我只能在它启动并运行后 ssh 进入。

什么可能导致无法使用最新的内核,我该如何解决?

apt
  • 2 个回答
  • 2752 Views
Martin Hope
Stephen Ostermiller
Asked: 2015-09-22 16:17:26 +0800 CST

我如何摆脱 Gnome 中的幽灵打印机?

  • 23

当我尝试从 Gnome 应用程序打印时,打印对话框列出了无法正常工作的打印机。它被称为“duerqxesz5090——地下室杂物间——拒绝工作”。这是 Gnome 打印对话框的屏幕截图:

幽灵打印机

  • 如果我尝试选择该打印机,应用程序将冻结几分钟甚至崩溃。
  • 我只能通过 Gnome 程序(例如 gedit 或 glabels)获得此信息,但不能通过 firefox 或 libreoffice
  • 这可能是我在某个时候安装的旧打印机的残余。我确实在地下室杂物间安装了打印机。
  • 我没有使用 Gnome(我使用的是 xfce),但我过去使用过 Gnome。
  • 我的 Ubuntu 版本是 Ubuntu 15.04 (Vivid)
  • CUPS 对这个幽灵打印机一无所知:杯子
  • system-config-printer 对这台打印机一无所知:系统配置打印机

我怎样才能找出这个不存在的打印机在我的系统上的哪个位置并删除它?

我试过在不同的地方搜索它,但这些都没有返回任何结果:

  • dconf dump / | grep duerqx
  • sudo grep -r duerqx /etc/
  • gsettings list-recursively | grep duerqx
gnome
  • 2 个回答
  • 9476 Views
Martin Hope
Stephen Ostermiller
Asked: 2015-05-09 12:26:23 +0800 CST

使用 systemd 将 xvfb for Vivid (15.04) 配置为服务

  • 3

Vivid 从 upstart 切换到 systemd。我曾经将 xfvb 配置为在 updstart 下作为服务运行。现在已经坏了。

在 upstart 下,我有/etc/init/xvfb.conf:

description     "Xvfb X Server"
start on (net-device-up
    and local-filesystems
    and runlevel [2345])
stop on runlevel [016]
exec /usr/bin/Xvfb :99 -screen 0 1024x768x24

我可以从sudo service xvfb start

在 15.04 下,当我尝试使用服务启动 xvfb 时,我现在收到此消息:

无法启动 xvfb.service:单元 xvfb.service 无法加载:没有这样的文件或目录。

配置 xvfb 以使用 systemd 作为服务运行的新方法是什么?

services
  • 1 个回答
  • 5359 Views
Martin Hope
Stephen Ostermiller
Asked: 2014-12-12 11:41:24 +0800 CST

即使存储库尚未针对我的 Ubuntu 发行版更新,我也可以安装软件吗?

  • 0

我正在尝试安装Fuze Meeting客户端,我打算将其用于工作中的网络研讨会。他们有一个 Linux 客户端,并通过apt Repository提供。

他们的安装说明是:

sudo bash -c 'echo "deb http://apt.fuzebox.com/apt $(lsb_release -sc) main" > /etc/apt/sources.list.d/fuzebox.list'
sudo wget -O /etc/apt/trusted.gpg.d/fuzebox.gpg http://apt.fuzebox.com/apt/keyring.gpg
sudo apt-get update
sudo apt-get install fuzelinuxclient

但是我在 Utopic 14.10 上,他们的存储库仅通过 Trusty 最新。有没有办法在 Utopic 上安装这个软件,即使它只对旧版本的 Ubuntu 正式可用?

我尝试在上述步骤中替换为,但是当我尝试替换时收到以下$(lsb_release -sc)警告。trustyapt-get update

W:无法获取http://apt.fuzebox.com/apt/dists/trusty/Release 无法在发布文件中找到预期的条目“main/binary-amd64/Packages”(错误的 sources.list 条目或格式错误的文件)

然后当我尝试安装时出现此错误:

E: 无法定位包 fuzelinuxclient

apt
  • 1 个回答
  • 705 Views
Martin Hope
Stephen Ostermiller
Asked: 2014-06-04 05:44:13 +0800 CST

在 XUbuntu 中,gEdit 等 GTK 应用程序中存在黑色不可读的选项卡

  • 8

我在 Ubuntu 14.04 中使用 XFCE。当我打开 gEdit 时,顶部的选项卡不可读:

gEdit 中的黑色标签

做了一些研究后,这似乎是因为 gEdit 是一个 GTK 2.0 应用程序,如果您使用的主题没有针对 GTK 2.0 应用程序的特定解决方法,这个问题就会自行显现。

到目前为止,这是我尝试过的:

  • 这个论坛帖子似乎表明使用 Greybird 主题可以解决问题。上面的截图是用Greybird截的,并没有解决问题。
  • 这似乎与 StackOverflow 上提出的问题相同。 没有一个答案很有帮助。
  • 这是一个类似的问题,但与非常暗但不是黑色的选项卡有关:

  • 该论坛主题建议为 GTK 2.0 应用程序的后备主题创建一个配置文件。创建此配置文件并没有解决我的问题。

xubuntu
  • 1 个回答
  • 1549 Views

Sidebar

Stats

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

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

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

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve