我想问如何开发一个简单的脚本/应用程序并将其放在时间附近的状态栏中(右上角)。假设我有一台笔记本电脑,脚本每 10 秒获取一次电池当前使用情况(以瓦为单位),以便将其显示在状态栏中。我正在使用 ubuntu 16 和 unity
我无法安装包含 8188 EUS 芯片的 TP-LINK WN722N V2。然后我尝试安装backports v4.4.2,但也不想识别。
TP-Link 驱动安装错误抛出:
man@kman-livve:~$ cd '/home/kman/Documents/Tplink 722 N V2/rtl8188EUS_linux_v4.3.0.8_13968.20150417'
kman@kman-livve:~/Documents/Tplink ...$ sudo make
"******************************************"
"NO SKRC,we will use default KSRC"
"******************************************"
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.10.0-15-generic/build M=/home/kman/Documents/Tplink 722 N V2/rtl8188EUS_linux_v4.3.0.8_13968.20150417 modules
make[1]: Entering directory '/usr/src/linux-headers-4.10.0-15-generic'
arch/x86/Makefile:140: CONFIG_X86_X32 enabled but no binutils support
make[1]: *** No rule to make target '722'. Stop.
make[1]: Leaving directory '/usr/src/linux-headers-4.10.0-15-generic'
Makefile:1367: recipe for target 'modules' failed
Run Code Online (Sandbox Code Playgroud)
一个方法认识他,我不知道。谢谢
型号:TL-WN722N(EU)_V2_161112_Linux.zip 芯片组:rtl8188EUS_linux_v4.3.0.8_13
我终于开始学习和理解硬链接,以检查我是否理解了基础知识,其中我设法跳过了很多。在意识到它们有多出色之后,我想知道为什么 Ubuntu 的默认文件管理器 nautilus 没有更好地支持它们。
目前,创建文件链接的选项只有一个,它会创建一个“软”链接。
这样做的问题是,一旦您移动或重命名原始文件,它们就会损坏。
有没有办法让 nautilus 创建硬链接,或者某种插件/脚本/配置/调整,我可以在右键单击菜单或键盘快捷键中添加选项,以创建硬链接文件?
我有几个终端配置文件。我可以在启动时打开所有配置文件,但它们在启动应用程序中使用此 cmd 在不同的窗口中打开:
gnome-terminal --window-with-profile=ablack && gnome-terminal --window-with-profile=agreeen && gnome-terminal --window-with-profile=aubergine && gnome-terminal --window-with-profile=beige && gnome-terminal --window-with-profile=cyan && gnome-terminal --window-with-profile=grey && gnome-terminal --window-with-profile=orange && gnome-terminal --window-with-profile=white && gnome-terminal --window-with-profile=yellow && gnome-terminal --window-with-profile=ablack
Run Code Online (Sandbox Code Playgroud)
我试图用这个 cmd 打开一个带有多个选项卡的窗口,但没有成功:
gnome-terminal --window-with-profile=ablack && gnome-terminal --tab-with-profile=agreeen && gnome-terminal --tab-with-profile=aubergine && gnome-terminal --tab-with-profile=beige && gnome-terminal --tab-with-profile=cyan && gnome-terminal --tab-with-profile=grey && gnome-terminal --tab-with-profile=orange && gnome-terminal --tab-with-profile=white && gnome-terminal --tab-with-profile=yellow && gnome-terminal --tab-with-profile=ablack
Run Code Online (Sandbox Code Playgroud)
如何使它工作?
在我们的工作内联网中,我收到以下形式的链接:
file:///home/bruni/Documents/
Run Code Online (Sandbox Code Playgroud)
(这些链接指向我的本地文件系统上的安装点。)
是否可以点击这些链接并在 Dolphin 中打开它们?
我在 KUbuntu 17.10 上使用谷歌浏览器。
在 Firefox 中,我发现了一个附加组件(Local Filesystem Links)可以做到这一点(尽管奇怪的是它在 Nautilus 而不是 Dolphin 中打开链接)。
在 Chrome 上,我尝试过的每个附加组件似乎都是为 Windows 编写的。有人知道 Kubuntu 下 Chrome 的类似解决方案吗?
PS:澄清一下。对于 Ubuntu 来说,一种解决方案是这样的。
我怎样才能一步完成此操作?
下载备份命令:
curl http://s3.aws.com/backup.sql
Run Code Online (Sandbox Code Playgroud)
恢复备份命令:
sudo -u postgres psql <PIPE-THE-OUTPUT-OF-PREVIOUS-COMMAND>
Run Code Online (Sandbox Code Playgroud) 我已经安装了 PHP v7.2。当我php -v在终端中进行操作时,我得到:
$ php -v
PHP 7.2.0-2+ubuntu16.04.1+deb.sury.org+2 (cli) (built: Dec 7 2017 20:14:31) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.2.0-2+ubuntu16.04.1+deb.sury.org+2, Copyright (c) 1999-2017, by Zend Technologies
Run Code Online (Sandbox Code Playgroud)
哪个php,给我,/usr/bin/php?
但是php.ini那个目录中没有。我怎样才能找到 的位置php.ini?
我想要的是找到运行 bash 脚本的用户的名称,当这个脚本由sudo. 据我所知,唯一可能的方法是以这种方式解析who -m( who am i)的输出:
user@UbuntuServer:~$ cat who.sh
#!/bin/sh
whoami
echo $USER
who -m | awk '{print $1}'
user@UbuntuServer:~$ sudo ./who.sh
root
root
user
Run Code Online (Sandbox Code Playgroud)
问题是:在 Ubuntu Desktop 16.04.4 who -m(resp. who am i) 中什么都不做。为什么?
另一个问题是为什么 Ubuntu 的在线手册页与在 Ubuntu 桌面或服务器上执行who不同man who?
但根据我的目标,这些问题并不是那么重要。正如标题中提到的,主要问题是:我如何找到哪个用户在使用时执行脚本sudo?
实际上,原始标题 -如何在 Ubuntu 桌面上找到“我是谁”?- 是相同但错误地提出的问题。
我正在 Ubuntu 18.04 服务器中添加一个名为“test”的用户。当我使用 添加用户时adduser,如下所示:
sudo adduser --system --group test --shell /bin/bash
Run Code Online (Sandbox Code Playgroud)
一切顺利,我可以正常登录,但 .bashrc、.bash_logout 和 .bash_profile 不是默认在主目录中创建的。useradd而当我使用如下方式添加用户时:
sudo useradd -m test -s /bin/bash
Run Code Online (Sandbox Code Playgroud)
添加用户的方式与adduser我在主目录中预配置的 .bash_profile、.bashrc 和 .bash_logout 相同。
有人可以解释为什么会有差异吗?adduser我在使用中缺少任何标志吗?
阅读时 /etc/resolv.conf:
me@alpha:~$ cat /etc/resolv.conf | tail -3
# operation for /etc/resolv.conf.
nameserver 127.0.0.53
Run Code Online (Sandbox Code Playgroud)
我从互联网上得到了 DNS 的想法:IP 地址和 DNS - YouTube并且知道 DNS 是谷歌公共 DNS - 维基百科
默认名称服务器怎么可能是本地主机地址?我想不可能访问外部服务。