场景:我正在尝试在基于 Ubuntu 18.04 docker 映像的 docker 容器上设置时区。只需拉取镜像并更新即可
> apt-get -y update
Run Code Online (Sandbox Code Playgroud)
错误:
运行时
> timedatectl
Run Code Online (Sandbox Code Playgroud)
我明白了
> timedatectl: command not found
Run Code Online (Sandbox Code Playgroud)
问题:如何安装timedatectl?
到目前为止我尝试过的:我尝试按如下方式安装 timedatectl
> apt-get -y install timedatectl
> Unable to locate package timedatectl
Run Code Online (Sandbox Code Playgroud)
谢谢
场景:我正在尝试在基于 Ubuntu 18.04 docker 映像的 docker 容器上设置时区。只需拉取映像、更新并安装 systemd
> apt-get -y update
> apt-get -y install systemd
Run Code Online (Sandbox Code Playgroud)
错误: 无法创建总线连接:没有这样的文件或目录
> timedatectl
> timedatectl: Failed to create bus connection: No such file or directory
Run Code Online (Sandbox Code Playgroud)
问题:我缺少什么?
注意: etc目录下没有localtime和timezone文件
> ls /etc/localtime
> ls: cannot access '/etc/localtime': No such file or directory
> ls /etc/timezone
> ls: cannot access '/etc/timezone': No such file or directory
Run Code Online (Sandbox Code Playgroud)
我已经看到了这个和这个但没有解决,因为在我的情况下没有缺少 dbus
> apt-get install dbus
> dbus is already the newest …Run Code Online (Sandbox Code Playgroud) 我使用的是美国国际用“的AltGr死键”布局和选项开关Alt和Win按键。不错,但我的AltGr不起作用。我要使用的AltGr密钥具有密钥代码 134(使用 xev 发现)。所以我创建了一个 .Xmodmap 文件:
keycode 134 = ISO_Level3_Shift Multi_key ISO_Level3_Shift Multi_key
Run Code Online (Sandbox Code Playgroud)
比我执行“xmodmap .Xmodmap”。当我现在展示我的修饰符时,我得到:
> xmodmap
xmodmap: up to 4 keys per modifier, (keycodes in parentheses):
shift Shift_L (0x32), Shift_R (0x3e)
lock
control Control_L (0x25), Control_R (0x69)
mod1 Alt_L (0x85), Meta_L (0xcd)
mod2 Num_Lock (0x4d)
mod3
mod4 Super_L (0x40), Super_R (0x6c), Super_L (0xce), Hyper_L (0xcf)
mod5 ISO_Level3_Shift (0x5c), ISO_Level3_Shift (0x86), Mode_switch (0xcb)
Run Code Online (Sandbox Code Playgroud)
但是...按下AltGr(代码为 134=0x86 的键)+q不会给出预期的结果 - 这将是“a-umlaut”。这应该!xmodmap …
在 Ubuntu Server Installer 中,我们不能将数字作为主机名的第一个字符。但是,一旦安装,我们可以发出一个主机名命令来重命名服务器以具有数字前缀。这个限制有什么原因吗?
例如,在安装程序中,我可以创建一个主机名
WebServer1
Run Code Online (Sandbox Code Playgroud)
但不是
0WebServer1
Run Code Online (Sandbox Code Playgroud)
但是,我可以创建一个名称为
WebServer1
Run Code Online (Sandbox Code Playgroud)
然后,在 CLI 中,将其重命名为
0WebServer1
Run Code Online (Sandbox Code Playgroud)
请告知为什么存在此限制,以及是否有解决此限制的任何注意事项。
在 Lenovo t440p 上的 Ubuntu 15.10 和 15.04 上,当我在 Netbeans 中编写代码并意外单击按钮AltGr时PrtSc,它崩溃并重新启动系统。这对于新安装的 Ubuntu 不适用。
这是系统日志的回溯:
Feb 5 19:47:43 mycomputername kernel: [ 15.485327] sysrq: SysRq : HELP : loglevel(0-9) reboot(b) crash(c) terminate-all-tasks(e) memory-full-oom-kill(f) kill-all-tasks(i) thaw-filesystems(j) sak(k) show-backtrace-all-active-cpus(l) show-memory-usage(m) nice-all-RT-tasks(n) poweroff(o) show-registers(p) show-all-timers(q) unraw(r) sync(s) show-task-states(t) unmount(u) force-fb(V) show-blocked-tasks(w) dump-ftrace-buffer(z)
Feb 5 19:47:44 mycomputername kernel: [ 16.966879] sysrq: SysRq : HELP : loglevel(0-9) reboot(b) crash(c) terminate-all-tasks(e) memory-full-oom-kill(f) kill-all-tasks(i) thaw-filesystems(j) sak(k) show-backtrace-all-active-cpus(l) show-memory-usage(m) nice-all-RT-tasks(n) poweroff(o) show-registers(p) show-all-timers(q) unraw(r) sync(s) show-task-states(t) …Run Code Online (Sandbox Code Playgroud) 尝试关闭 Ubuntu 18.04 虚拟机后,我收到以下消息:
a stop job is running for unattended upgrades shutdown
Run Code Online (Sandbox Code Playgroud)
现在做什么?