Откройте терминал и попробуйте выполнить следующие команды:
dpkg -S 'command name'
например: dpkg -S /bin/ls
Пример вывода:
coreutils: /bin/ls
Вы также можете получить подробную информацию о статусе пакета coreutils, введите:
dpkg -s coreutils
Пример вывода:
Package: coreutils
Essential: yes
Status: install ok installed
Priority: required
Section: utils
Installed-Size: 9040
Maintainer: Ubuntu Core Developers
Architecture: i386
Version: 5.97-5.3ubuntu3
Replaces: textutils, shellutils, fileutils, stat, debianutils (<= 2.3.1), dpkg (<< 1.13.2)
Provides: textutils, shellutils, fileutils
Pre-Depends: libacl1 (>= 2.2.11-1), libc6 (>= 2.6-1), libselinux1 (>= 2.0.15)
Conflicts: stat
Description: The GNU core utilities
This package contains the essential basic system utilities.
.
Specifically, this package includes:
basename cat chgrp chmod chown chroot cksum comm cp csplit cut date dd df dir
dircolors dirname du echo env expand expr factor false fmt fold groups head
hostid id install join link ln logname ls md5sum mkdir mkfifo mknod mv nice nl
nohup od paste pathchk pinky pr printenv printf ptx pwd readlink rm rmdir
sha1sum seq shred sleep sort split stat stty sum sync tac tail tee test touch
tr true tsort tty uname unexpand uniq unlink users vdir wc who whoami yes
Original-Maintainer: Michael Stone
Я написал сценарий для управления виртуальной машиной с помощью VBoxManage. вы можете выполнить commandS с помощью скрипта следующим образом:
./vmcontrol.sh -m [VMName] [Your Command]
Сценарий:
#!/bin/bash
#Creation du script vmcontrol.sh
function execute
{
vmname=\$1;
command=\$2;
shift 2;
VBoxManage --nologo guestcontrol \$vmname execute --image \$command --username root --password root --wait-exit --wait-stdout --wait-stderr -- \$@ 2>&1 ;
}
param=\$1;
#Execution d'une commande
if [ \$param = "-e" ]
then
command=\$2;
shift 1;
execute "Xubuntu" \$@ ;
#Execution d'une commande dans une vm donnée
elif [ \$param = "-m" ]
then
vmname=\$2;
command=\$3;
shift 1;
execute \$@
#Allumer une machine virtuelle donnée
elif [ \$param = "-s" ]
then
vmname=\$2;
VBoxHeadless --startvm \$vmname;
elif [ \$param = "-c" ]
then
vmname=\$2;
VBoxManage clonevm Xubuntu --mode machine --name \$vmname --basefolder /home/VMs --register ;
elif [ \$param = "-r" ]
then
vmname=\$2;
VBoxManage unregistervm \$vmname --delete ;
elif [ \$param = "-vbox" ]
then
startx virtualbox;
elif [ \$param = "-i" ]
then
vmname=\$2;
if [ \$vmname = "vms" ]
then
VBoxManage list vms
elif [ \$vmname = "runningvms" ]
then
VBoxManage list runningvms
else
#Erreur
echo "error in commmande";
fi
elif [ \$param = "-sv" ]
then
vmname=\$2;
VBoxManage startvm \$vmname ;
elif [ \$param = "-p" ]
then
vmname=\$2;
VBoxManage controlvm \$vmname acpipowerbutton;
else
#Erreur
echo "error in commmande";
fi