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-1342430

Tms91's questions

Martin Hope
Tms91
Asked: 2024-05-28 23:37:19 +0800 CST

/var/log/lastlog 很大 - 如何对其进行日志轮转

  • 5

在我的文件系统上,文件 /var/log/lastlog 非常大

ll /var/log/lastlog

-rw-rw-r-- 1 root utmp 494536286056 May 28 17:27 /var/log/lastlog

是否有一种 Ubuntu 原生的方式来记录它?

filesystem
  • 1 个回答
  • 123 Views
Martin Hope
Tms91
Asked: 2024-02-23 18:33:19 +0800 CST

我应该将函数放在 .bashrc、.bash_aliases 或 .profile 中吗

  • 12

我已经读过这篇关于在哪里放置别名的帖子。

现在,假设我的自定义命令非常复杂(在输入中接受参数,由几个相继运行的命令组成,为了清楚起见,我想将其保留为多行,涉及引号、双引号等),所以我想将它定义为一个函数,例如

sshdev_system_loop () {
        while true; do
          echo "[$(date +'%Y-%m-%d %H:%M:%S')] Trying to log into ststem $2 as user $1 ."
          timeout 10 ssh $1@$2
        done
}

我应该把它放在.bash_aliases或 的末尾.bashrc或 中.profile吗?

一方面,我不想把它放进去,.bash_aliases因为它会“破坏”列表

alias alias_name='command/list of commands'

另一方面,.bashrc它看起来像是操作系统管理的文件,所以我不想向其中添加内容。

那么在 Ubuntu 中将功能添加为自定义命令的最佳实践是什么?

command-line
  • 2 个回答
  • 844 Views
Martin Hope
Tms91
Asked: 2024-01-12 18:15:55 +0800 CST

如何通过终端升级 Virtualbox 来宾添加?

  • 3

今天,当我启动 Virtualbox VM 并尝试启用第二个屏幕时,我发现启用它的按钮已“变灰”并且无法单击。直到昨天它还在工作。

我做了一些研究,发现几个线程(即这个)表明问题可能出在 VM Guest Additions 上。实际上,其他功能(例如主机和来宾操作系统之间的复制粘贴)被禁用。

因此,我尝试从 VM 顶部菜单(设备 > 升级来宾添加)更新 Virtualbox 来宾添加,但出现以下弹出错误:

Creating installation directory "/tmp/" on guest failed: VERR_NOT_FOUND.


Result Code:
VBOX_E_IPRT_ERROR (0X80BB0005)
Component:
GuestSessionWrap
Interface:
IGuestSession {234f0627-866d-48c2-91a5-4c9d50f04928}

我已经检查了我的机器上是否存在 /tmp/ 目录,但我猜由于某种原因它无法在那里下载新的安装文件。

所以我想通过终端更新 Virtualbox Guest Additions。

我该怎么做?

我尝试过的

通过遵循本教程,我尝试重新安装来宾添加项

sudo apt update

我在这里收到消息

4 packages can be upgraded. Run 'apt list --upgradable' to see them

然后出现此错误消息:

W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:50
W: Target Packages (main/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:50
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:50
W: Target Translations (main/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:50
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:50
W: Target DEP-11 (main/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:50
W: Target DEP-11 (main/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:50
W: Target DEP-11-icons-small (main/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:50
W: Target DEP-11-icons (main/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:50
W: Target DEP-11-icons-hidpi (main/dep11/[email protected]) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:50
W: Target CNF (main/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:50
W: Target CNF (main/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:50
W: Target Packages (restricted/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:50
W: Target Packages (restricted/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:50
W: Target Packages (restricted/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:50
W: Target Translations (restricted/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:50
W: Target Translations (restricted/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:50
W: Target DEP-11 (restricted/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:50
W: Target DEP-11 (restricted/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:50
W: Target DEP-11-icons-small (restricted/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:50
W: Target DEP-11-icons (restricted/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:50
W: Target DEP-11-icons-hidpi (restricted/dep11/[email protected]) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:50
W: Target CNF (restricted/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:50
W: Target CNF (restricted/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:50
E: The repository 'http://security.ubuntu.com/ubuntu hirsute-security Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:48 and /etc/apt/sources.list:51
W: Target Packages (main/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:48 and /etc/apt/sources.list:51
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:48 and /etc/apt/sources.list:51
W: Target Translations (main/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:48 and /etc/apt/sources.list:51
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:48 and /etc/apt/sources.list:51
W: Target DEP-11 (main/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:48 and /etc/apt/sources.list:51
W: Target DEP-11 (main/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list:48 and /etc/apt/sources.list:51
W: Target DEP-11-icons-small (main/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list:48 and /etc/apt/sources.list:51
W: Target DEP-11-icons (main/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:48 and /etc/apt/sources.list:51
W: Target DEP-11-icons-hidpi (main/dep11/[email protected]) is configured multiple times in /etc/apt/sources.list:48 and /etc/apt/sources.list:51
W: Target CNF (main/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list:48 and /etc/apt/sources.list:51
W: Target CNF (main/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list:48 and /etc/apt/sources.list:51
W: Target Packages (restricted/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:48 and /etc/apt/sources.list:51
W: Target Packages (restricted/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:48 and /etc/apt/sources.list:51
W: Target Packages (restricted/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:48 and /etc/apt/sources.list:51
W: Target Translations (restricted/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:48 and /etc/apt/sources.list:51
W: Target Translations (restricted/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:48 and /etc/apt/sources.list:51
W: Target DEP-11 (restricted/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:48 and /etc/apt/sources.list:51
W: Target DEP-11 (restricted/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list:48 and /etc/apt/sources.list:51
W: Target DEP-11-icons-small (restricted/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list:48 and /etc/apt/sources.list:51
W: Target DEP-11-icons (restricted/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:48 and /etc/apt/sources.list:51
W: Target DEP-11-icons-hidpi (restricted/dep11/[email protected]) is configured multiple times in /etc/apt/sources.list:48 and /etc/apt/sources.list:51
W: Target CNF (restricted/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list:48 and /etc/apt/sources.list:51
W: Target CNF (restricted/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list:48 and /etc/apt/sources.list:51
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:50
W: Target Packages (main/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:50
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:50
W: Target Translations (main/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:50
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:50
W: Target DEP-11 (main/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:50
W: Target DEP-11 (main/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:50
W: Target DEP-11-icons-small (main/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:50
W: Target DEP-11-icons (main/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:50
W: Target DEP-11-icons-hidpi (main/dep11/[email protected]) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:50
W: Target CNF (main/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:50
W: Target CNF (main/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:50
W: Target Packages (restricted/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:50
W: Target Packages (restricted/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:50
W: Target Packages (restricted/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:50
W: Target Translations (restricted/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:50
W: Target Translations (restricted/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:50
W: Target DEP-11 (restricted/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:50
W: Target DEP-11 (restricted/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:50
W: Target DEP-11-icons-small (restricted/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:50
W: Target DEP-11-icons (restricted/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:50
W: Target DEP-11-icons-hidpi (restricted/dep11/[email protected]) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:50
W: Target CNF (restricted/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:50
W: Target CNF (restricted/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:50
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:48 and /etc/apt/sources.list:51
W: Target Packages (main/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:48 and /etc/apt/sources.list:51
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:48 and /etc/apt/sources.list:51
W: Target Translations (main/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:48 and /etc/apt/sources.list:51
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:48 and /etc/apt/sources.list:51
W: Target DEP-11 (main/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:48 and /etc/apt/sources.list:51
W: Target DEP-11 (main/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list:48 and /etc/apt/sources.list:51
W: Target DEP-11-icons-small (main/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list:48 and /etc/apt/sources.list:51
W: Target DEP-11-icons (main/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:48 and /etc/apt/sources.list:51
W: Target DEP-11-icons-hidpi (main/dep11/[email protected]) is configured multiple times in /etc/apt/sources.list:48 and /etc/apt/sources.list:51
W: Target CNF (main/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list:48 and /etc/apt/sources.list:51
W: Target CNF (main/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list:48 and /etc/apt/sources.list:51
W: Target Packages (restricted/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:48 and /etc/apt/sources.list:51
W: Target Packages (restricted/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:48 and /etc/apt/sources.list:51
W: Target Packages (restricted/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:48 and /etc/apt/sources.list:51
W: Target Translations (restricted/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:48 and /etc/apt/sources.list:51
W: Target Translations (restricted/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:48 and /etc/apt/sources.list:51
W: Target DEP-11 (restricted/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:48 and /etc/apt/sources.list:51
W: Target DEP-11 (restricted/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list:48 and /etc/apt/sources.list:51
W: Target DEP-11-icons-small (restricted/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list:48 and /etc/apt/sources.list:51
W: Target DEP-11-icons (restricted/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:48 and /etc/apt/sources.list:51
W: Target DEP-11-icons-hidpi (restricted/dep11/[email protected]) is configured multiple times in /etc/apt/sources.list:48 and /etc/apt/sources.list:51
W: Target CNF (restricted/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list:48 and /etc/apt/sources.list:51
W: Target CNF (restricted/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list:48 and /etc/apt/sources.list:51

所以我跑

apt list --upgradable

并得到

tommaso@tommaso-VirtualBox:~$ apt list --upgradable
Listing... Done
gjs/jammy-updates 1.72.4-0ubuntu0.22.04.1 amd64 [upgradable from: 1.72.2-0ubuntu2]
libgjs0g/jammy-updates 1.72.4-0ubuntu0.22.04.1 amd64 [upgradable from: 1.72.2-0ubuntu2]
transmission-common/jammy-updates,jammy-updates 3.00-2ubuntu2.1 all [upgradable from: 3.00-2ubuntu2]
transmission-gtk/jammy-updates 3.00-2ubuntu2.1 amd64 [upgradable from: 3.00-2ubuntu2]

然后

sudo apt install build-essential linux-headers-$(uname -r) -y

VM顶部菜单> Guest Additions CD Image,似乎什么也没发生,但我猜是因为它们已经安装了,但没有更新。

cd /media/<MY_USER>/VBox_GAs_7.0.4/
sudo ./VBoxLinuxAdditions.run

但我得到

Cannot reload kernel modules: one or more modules is still in use

所以我重新启动虚拟机,然后sudo ./VBoxLinuxAdditions.run再次运行,但没有任何变化。

我已经更新了 VirtualBox 应用程序,但这并不能解决问题。

22.04
  • 1 个回答
  • 73 Views
Martin Hope
Tms91
Asked: 2023-05-05 06:44:53 +0800 CST

无法连接到服务器:连接失败:连接被拒绝该主机上运行的服务器是否正在接受 tcp/ip 连接?

  • 6

我在 Ubuntu 22.04 上安装了 postgres 13.10 和 PGAdmin4 7.1

在 PGAdmin4 UI 中,我想使用这些配置“添加新服务器”

name
postgres-local

username
postgres

pw
postgres

hostanme / address
127.0.0.1

port
5432

server group
Servers

所以我在我的终端运行

sudo -i -u postgres

psql


ALTER USER postgres WITH PASSWORD 'postgres';

然后我登录到 PGAdmin4,尝试添加新服务器插入上面的配置,但是当我点击保存时我得到这个错误

unable to connect to server: connection failed: connection refused is the server running on that host accepting tcp/ip connections?

可能是什么问题呢?

我已经尝试过的

我已经通过sudo service postgresql status.

在此处输入图像描述

我已经尝试过

编辑文件/etc/postgresql/13/main/postgresql.conf取消注释
listen_addresses = 'localhost'
并将其更改为
listen_addresses = '*'

编辑文件/etc/postgresql/13/main/pg_hba.conf更改行

# IPv4 local connections:
host    all             all             127.0.0.1/32               md5

到

# IPv4 local connections:
host    all             all             0.0.0.0/0               md5

重新启动 postgres

sudo service postgresql restart

但我没有成功。

server
  • 1 个回答
  • 61 Views
Martin Hope
Tms91
Asked: 2022-11-24 05:45:01 +0800 CST

Oneliner 获取在某个端口上启动进程的命令

  • 7

我需要一个单行命令,给定一个端口号,返回有关启动在该端口上运行的进程的命令的信息。

通常,我通过运行一个sudo netstat

sudo netstat -antpv | grep PORT_NUMBER

它返回PID_NUMBER第 4 列,在列字符 ( :) 之后,然后我使用PID_NUMBER作为输入的ps aux

ps aux | grep PID_NUMBER

它在第 11 列返回有关“启动命令”的信息。

例如

# use the port number to get the process id
my_machine:~$ sudo netstat -antpv | grep 30001
tcp        0      0 0.0.0.0:30001           0.0.0.0:*               LISTEN      616/python

# use the process id to get info on the command which started the process
my_machine:~$ ps aux | grep 616    
my_user       616  0.8  0.5 220112 89596 ?        S    01:10   6:59 /usr/bin/python my_program.py --log=INFO

是否可以通过一行命令获取此信息?

例如

my_machine:~$ ps aux | grep get_only_the_number_after_the_column_character_in_the_4th_column_of(sudo netstat -antpv | grep PORT_NUMBER)

/usr/bin/python my_program.py --log=INFO

更新

我几乎在做。

我得到我想要的

my_machine ~$ ps aux | awk '{if ($2 == "616") print $0;}'

my_user       616  0.7  0.5 220112 89596 ?        S    01:10   8:11 /usr/bin/python my_program.py --log=INFO

但是当我尝试将 PID 保存在 bash 变量中然后将其传递给 awk 时它不起作用

my_machine:~$ mypid=$(sudo lsof -ti :30001)
my_machine:~$ echo $mypid 
616

my_machine:~$ ps aux | awk '{if ($2 == "$mypid") print $0;}'
my_machine:~$

my_machine:~$ ps aux | awk -v mypid="$mypid" '{if ($2 == "mypid") print $0;}'
my_machine:~$

my_machine:~$ ps aux | awk -v mypid="616" '{if ($2 == "mypid") print $0;}'
my_machine:~$
networking
  • 1 个回答
  • 198 Views
Martin Hope
Tms91
Asked: 2022-01-12 00:21:52 +0800 CST

在终结者中打开新标签的命令是什么?

  • 1

在Ubuntu 终端中,打开终端新选项卡的命令是

gnome-terminal --tab

终结者的等价物是什么?

我努力了

terminator --tab

和

gnome-terminal -T

但这些命令不起作用。

command-line
  • 1 个回答
  • 186 Views
Martin Hope
Tms91
Asked: 2021-09-28 12:36:08 +0800 CST

如何在没有互联网连接的 PC 上重新安装 Ubuntu,并通过 USB 驱动器从 iso 获得 Ubuntu Server 版本操作系统(无桌面 GUI)

  • 0

我想在无法连接到互联网的运行 Ubuntu Server OS(无 GUI)的 PC(我们称之为 PC_1)上重新安装 Ubuntu。

为此,我已经从另一台 PC 下载了Ubuntu 18.04 iso,但我不知道该怎么做。

我已经用Balena Etcher在 USB 驱动器上刷新了 iso ,但是我不知道如何继续。

我想我应该将 USB 驱动器连接到 PC_1,找到 USB 驱动器并从命令提示符运行一些东西来告诉 PC 从 USB 驱动器安装 Ubuntu OS....

我应该运行哪些命令?

boot
  • 1 个回答
  • 60 Views
Martin Hope
Tms91
Asked: 2021-08-03 05:29:12 +0800 CST

Ubuntu:在调整运行 Ubuntu 的 Virtualbox VM 的分区时调整分区大小时出错(主机是 Windows10)

  • 0

我正在尝试调整在 Windows 10 上运行的 VM(Virtualbox)内运行的 Ubuntu 操作系统的硬盘大小(从 20 GB 到 270 GB)。

按照这个线程中的说明,我关闭了我的虚拟机并在我的 Windows 10 Powershell 上运行:

C:\Users\Bob> C:\"Program Files"\Oracle\VirtualBox\VBoxManage.exe modifyhd C:\Users\Bob\"VirtualBox VMs"\Tommaso_Ubuntu01\Tommaso_Ubuntu01.vdi --resize 270000

我很容易得到

0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%

这样当我在 Virtualbox 面板上检查我的虚拟机设置时,我会看到:

虚拟盒子截图

然后我继续按照线程中的步骤进行操作:我启动我的虚拟机,转到

应用程序(底部栏中的 9 点正方形)> 磁盘 > 硬盘(左侧栏)

然后

选择Partition 3(我之前调整为 21 的分区)> 齿轮按钮 > 调整大小 > 将分区设置为 270 GB

但我得到:

调整分区大小时出错

调整分区 /dev/sda3 大小时出错:无法在设备“/-dev/sda/”上进行分区大小(无法满足分区上的所有约束。)(udisk-error-quark,0)

有什么问题?我该如何解决?

错误截图

partitioning
  • 1 个回答
  • 2222 Views
Martin Hope
Tms91
Asked: 2021-07-24 03:27:04 +0800 CST

如何让 Enno Gröper selectyall-Terminator-Plugin 工作(Ubuntu)?

  • 1

我正在开发在 Windows 10 上由 Virtualbox 制成的 VM 内运行的 Ubuntu。

通过寻找一种方法来选择终结者终端中的所有文本,我开始关注这个 AU 线程,指示如何安装Thierry Ds copyall-Terminator-Plugin。

copyall.py插件由 Enno Gröper 修改并转换为selectall.py插件,可在 Github 上找到。

我试图重做 AU 线程中提到的步骤,但我无法让我的插件工作:

从我的终结者:

cd /usr/share/terminator/terminatorlib/

sudo mkdir plugins

cd plugins

sudo vim selectall.py

我将来自https://github.com/egroeper/terminator-plugins/blob/master/selectall.py的代码粘贴到那里

退出并保存并检查文本是否有效保存在那里

重启终结者

右键单击终结者 > 首选项 > 插件

但是没有新插件。

我怎样才能让它出现和工作?

- - 更新 - -

为了给你更多的背景信息,我在这里粘贴:

  1. 的输出ls -al /usr/share/terminator/terminatorlib/plugins/

在此处输入图像描述

  1. 右键单击 Terminator -> Preferences -> Plugins 的屏幕截图

在此处输入图像描述

  1. 右键单击终结者时看到的屏幕截图(特别是上下文菜单)

在此处输入图像描述

python
  • 2 个回答
  • 123 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