通常我们可以~/.bashrc使用这个命令来获取文件
source ~/.bashrc
Run Code Online (Sandbox Code Playgroud)
但是如果我在 shell 脚本中编写并执行它,则什么也不会发生。为什么?
有没有办法做到这一点?
我的脚本:
#!/bin/bash
chmod a+x ~/.bashrc
source ~/.bashrc
Run Code Online (Sandbox Code Playgroud)
也试过.(dot) 而不是source. 结果一样。
我正在为所有版本的 Ubuntu 开发离线安装程序,我需要 Ubuntu 的默认安装包列表。有没有办法从任何服务器(网络服务器)获取这些信息?用于获取任何 Ubuntu 版本的默认安装包列表的任何脚本。
我将提供 Ubuntu 版本,脚本将获取包列表。
注意:我至少需要一个服务器地址。我可以为此编写脚本。
我在双核 AMD E450 CPU 上运行。当我尝试使用 VirtualBox 运行需要硬件虚拟化的 64 位操作系统时,它向我显示了一条错误消息“AMD-V 未启用”。
我的 AMD 处理器应该提供 AMD-V 支持,但我找不到在 BIOS 中启用 AMD-V 的选项。
我怎么解决这个问题?如何为我的 CPU 启用 AMD-V?
提前致谢
lscpu :-
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 2
On-line CPU(s) list: 0,1
Thread(s) per core: 1
Core(s) per socket: 2
Socket(s): 1
NUMA node(s): 1
Vendor ID: AuthenticAMD
CPU family: 20
Model: 2
Stepping: 0
CPU MHz: 1650.000
BogoMIPS: 3291.72
Virtualization: AMD-V
L1d cache: 32K
L1i cache: 32K
L2 cache: …Run Code Online (Sandbox Code Playgroud) 我们可以在 Linux 中为单个接口使用多个 IP 地址(eg. eth0:0, eth0:1)。但是我们可以同时使用DHCP和静态IP吗?eth0:1应该有一个静态 IP 地址并且eth0:0应该使用 DHCP 进行配置。
我们如何才能做到这两点?
每当我发出命令 sudo apt-get install **它不会要求输入密码,我的管理员用户也不会。
如何让它提示输入密码?
我的 sudoer :
ubuntu:~$ sudo cat /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults env_reset
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification
root …Run Code Online (Sandbox Code Playgroud) 我正在尝试在 ubuntu 12.04 64 位机器上安装 ZTE MF191 驱动程序。我不确定它是否支持 64 位。但它在 32 位系统中运行良好。这些驱动程序包有一个名为zr的可执行文件当我尝试运行它时它会引发错误
libusb-0.1.so.4: cannot open shared object file: No such file or directory
Run Code Online (Sandbox Code Playgroud)
我用谷歌搜索但找不到安装(lib)它的方法。有些人建议安装 32 位版本,但我在突触中找不到。请帮忙。
我已经从 Ubuntu 升级了16.04。Wine已安装在我的系统中,但升级后返回以下错误。
it looks like wine32 is missing, you should install it.
as root, please execute "apt-get install wine32"
Run Code Online (Sandbox Code Playgroud)
所以我清除酒并使用以下步骤重新安装
1. sudo apt install wine-stable
2. WINEARCH=win32 WINEPREFIX=~/.wine32
3. wine #return error
4. wineboot
Run Code Online (Sandbox Code Playgroud)
但是,当我尝试使用wine它的节目运行任何东西时,它wine32仍然丢失。所以我尝试安装win32.
sudo apt install wine32
Run Code Online (Sandbox Code Playgroud)
The following packages have unmet dependencies:
wine32:i386 : Depends: libwine:i386 (= 1.8.5-1ubuntu1) but it is not going to be installed
Run Code Online (Sandbox Code Playgroud)
Distributor ID: Ubuntu
Description: Ubuntu 16.10
Release: 16.10 …Run Code Online (Sandbox Code Playgroud) 我正在使用 ubuntu 13.10 64 位。我只在耳机中听到了一侧(一个通道)的声音。笔记本音箱相当不错。笔记本电脑的耳机插孔和耳机都运行良好。是软件问题。我定期升级系统,这个问题是在最后 1 或 2 次升级后发生的。
还有一个解决方法。将音量调低,然后快速调高。做这几次后,恢复我耳机的两个通道。如何永久解决这个问题?
用户名 -r
3.11.0-15-generic
Run Code Online (Sandbox Code Playgroud)
播放 -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC270 Analog [ALC270 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
Run Code Online (Sandbox Code Playgroud)
猫 /proc/asound/version
Advanced Linux Sound Architecture Driver Version k3.11.0-15-generic.
Run Code Online (Sandbox Code Playgroud)
head -n 1 /proc/asound/card*/codec#*
==> /proc/asound/card0/codec#0 <==
Codec: Realtek ALC270
==> /proc/asound/card0/codec#3 <== …Run Code Online (Sandbox Code Playgroud) 我试图ubuntu-desktop在Ubuntu-Gnome(gnome shell). 使用unity-tweak我将主题设置为Ambiance. 但只有gtk2应用程序看起来不错。所有gtk3应用程序都有丑陋的边框(header bar)和背景(有时)。我附上了截图。
gtk3-theme-engineUbuntu unity的默认设置是什么?
究竟是什么意思
ls --author
Run Code Online (Sandbox Code Playgroud)
它真的返回文件或所有者的作者吗?如何为文件设置作者?我必须实现这部分 ( ls --author),所以需要知道它到底是什么。