ubuntu see if package is installed
dpkg -l {package_name}
ubuntu see if package is installed
dpkg -l {package_name}
bash check if package is installed
REQUIRED_PKG="some-package"
PKG_OK=$(dpkg-query -W --showformat='${Status}n' $REQUIRED_PKG|grep "install ok installed")
echo Checking for $REQUIRED_PKG: $PKG_OK
if [ "" = "$PKG_OK" ]; then
echo "No $REQUIRED_PKG. Setting up $REQUIRED_PKG."
sudo apt-get --yes install $REQUIRED_PKG
fi
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us