How to find reverse dependency on Debian/Ubuntu based GNU/Linux?

List all the reverse depends of certain package:

$ apt-cache rdepends pkg_name

For example:

$ apt-cache rdepends vde2

And you’ll get result like this:

vde2
Reverse Depends:
virtualbox
qemu-system-x86
qemu-system-sparc
qemu-system-ppc
qemu-system-misc
qemu-system-mips
qemu-system-arm
user-mode-linux
virtualbricks
virtualbox
vdetelweb
libvde-dev
libvde-dev
user-mode-linux
qemu-kvm
qemu-system
liblwipv6-2

More details via $ apt-cache showpkg pkg_name

Package: vde2
Versions:
2.3.2-4 (/var/lib/apt/lists/opensource.nchc.org.tw_debian_dists_wheezy_main_binary-amd64_Packages) (/var/lib/dpkg/status)
Description Language:
File: /var/lib/apt/lists/opensource.nchc.org.tw_debian_dists_wheezy_main_binary-amd64_Packages
MD5: c1d59c710a94c274459c01b82f926c5a
Description Language: en
File: /var/lib/apt/lists/opensource.nchc.org.tw_debian_dists_wheezy_main_i18n_Translation-en
MD5: c1d59c710a94c274459c01b82f926c5a

Reverse Depends:
virtualbox,vde2
qemu-system-x86,vde2
qemu-system-sparc,vde2
qemu-system-ppc,vde2
qemu-system-misc,vde2
qemu-system-mips,vde2
qemu-system-arm,vde2
user-mode-linux,vde2
virtualbricks,vde2
virtualbox,vde2
vdetelweb,vde2
libvde-dev,vde2 2.3.2-1
libvde-dev,vde2 2.3.2-1
user-mode-linux,vde2
qemu-kvm,vde2
qemu-system,vde2
liblwipv6-2,vde2
Dependencies:
2.3.2-4 – adduser (0 (null)) libc6 (2 2.7) libpcap0.8 (2 0.9.8) libvde0 (0 (null)) libvdeplug2 (0 (null)) vde2-cryptcab (0 (null)) qemu-kvm (0 (null)) qemu (0 (null)) vde (0 (null))
Provides:
2.3.2-4 –
Reverse Provides:

If we only want to know the installed dependencies, ask aptitude:

$ aptitude why vde2

It’ll tell us:

i qemu Depends qemu-system (>= 1.1.2+dfsg-6a+deb7u6)
i A qemu-system Recommends vde2

What about recursive depends? Try $ apt-rdepends --reverse pkg_name !
(Install via apt-get install apt-rdepends)

PS: reverse-depends has similar feature, but it’s in ubuntu-dev-tools, which depends on toooooo many packages, so I’ll not suggest you to use it for just finding the dependencies.

DigitalOcean的網路好快 … 拿來抓BT剛剛好 … ?

心血來潮想到之前開的VPS網路流量有點多都沒用到(3TB是要我怎麼用=,=…),那麼來幫忙Open source專案做BT種子好了

於是裝了transmission-daemon來幫忙抓BT

然後就隨便抓了幾個Debian/LibreOffice/Lubuntu的種子丟上去跑…

transmission_on_digitalocean

嚇死人了 … 抓個BT居然可以跑到超過500M (66.25MB/s)啊 …

看來DigitalOcean的網路真的滿不錯的,沒有選錯呢XDDDDD

Debian/Ubuntu based GNU/Linux 常用軟體

筆記一下可以直接透過 apt-get / aptitude 安裝的套件名稱

不同分支以及不同版本所內建的軟體會有所不同,可能部分套件已經有安裝過了,但透過套件管理程式下去安裝也沒影響就是了 ~ 有些靠相依性一起帶起來的套件也不一一列舉了 … 現在比較常使用的 OS 是 Linux Mint,based on Ubuntu,有些套件 Debian 不見得會有 :S

在文字介面跑的程式:
apt-file aptitude apt-show-versions aria2 bash-completion colordiff command-not-found cpu-checker curl debian-goodies dmidecode dstat ethtool exfat-fuse fail2ban fbterm gdebi geoip-bin git glances hdparm htop iftop inxi iotop iperf iperf3 irssi jq lm-sensors lsof lynis mailutils make moc mosh mtr-tiny needrestart nmap ntpdate openjdk-7-jre openssh-server p7zip-full p7zip-rar parallel pbzip2 pigz ppa-purge pv pxz realpath rename sensord smartmontools software-properties-common sudo sysstat tcpdump timelimit tmux tree ufw unattended-upgrades ioping unzip vim vnstat w3m whois xfsprogs xterm youtube-dl zram-config

圖形介面:
chromium-browser chromium-browser-l10n firefox firefox-locale-zh-hant pidgin qupzilla pepperflashplugin-nonfree terminator konsole update-notifier command-not-found mplayer skype wine freerdp-x11 libfreerdp-plugins-standard im-config gcin gcin-qt4-immodule gcin-gtk3-immodule gparted gsmartcontrol libreoffice-l10n-zh-tw hardinfo

開發才會用到的工具:
nodejs-legacy nodejs npm codeblocks codeblocks-contrib eclipse eclipse-cdt openjdk-7-jdk build-essential cmake libtool gettext libncurses5 gcc-multilib g++-multilib autoconf

比較少用到的開發相關工具:
qt-sdk qtcreator git-core git-svn git-cola subversion mercurial bzr clang android-tools-adb flex bison

架設LAMP(Linux+Apache+MySQL+PHP)伺服器(直接把php當成apache的module來用的作法):
apache2 libapache2-mod-php5 php5 php5-mysql
(視情況額外加入如php5-sqlite、php5-mysqlnd、php5-curl、php5-memcache等…)

Debian / Ubuntu 系列重設鍵盤配置

今天在灌 Ubuntu Server 的時候不小心手殘不知道選到什麼建配置,結果進vim之後就開始各種慘狀,而且網路還沒接上,也沒辦法用ssh進去把vim關掉XDDD 還好Ctrl + z 還有用,可以先把vim丟到背景…

果然dpkg-reconfigure是好夥伴,用這個命令進去進行重設回Generic 104-key PC就可以了!
sudo dpkg-reconfigure keyboard-configuration