• Skip to main content

Uly.me

cloud engineer

  • Home
  • About
  • Archives

ubuntu

Ubuntu Check Reboot Required

July 17, 2021

Check if reboot is required in Ubuntu.

at /var/run/reboot-required
*** System restart required ***

at /var/run/reboot-required *** System restart required ***

Filed Under: Linux Tagged With: reboot, required, ubuntu

Ubuntu Speedtest

April 18, 2021

Install Speedtest CLI.

sudo apt-get install gnupg1 apt-transport-https dirmngr
export INSTALL_KEY=379CE192D401AB61
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys $INSTALL_KEY
echo "deb https://ookla.bintray.com/debian generic main" | sudo tee  /etc/apt/sources.list.d/speedtest.list
sudo apt-get update
sudo apt-get install speedtest

sudo apt-get install gnupg1 apt-transport-https dirmngr export INSTALL_KEY=379CE192D401AB61 sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys $INSTALL_KEY echo "deb https://ookla.bintray.com/debian generic main" | sudo tee /etc/apt/sources.list.d/speedtest.list sudo apt-get update sudo apt-get install speedtest

To run.

speedtest

speedtest

Result.

$ speedtest
   Speedtest by Ookla
     Server: City of Columbus - Columbus, OH (id = 40410)
        ISP: Spectrum
    Latency:     9.39 ms   (0.63 ms jitter)
   Download:   117.74 Mbps (data used: 60.3 MB)                               
     Upload:    11.81 Mbps (data used: 5.6 MB)                               
Packet Loss:     0.0%
 Result URL: https://www.speedtest.net/result/c/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx (redacted)

$ speedtest Speedtest by Ookla Server: City of Columbus - Columbus, OH (id = 40410) ISP: Spectrum Latency: 9.39 ms (0.63 ms jitter) Download: 117.74 Mbps (data used: 60.3 MB) Upload: 11.81 Mbps (data used: 5.6 MB) Packet Loss: 0.0% Result URL: https://www.speedtest.net/result/c/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx (redacted)

Filed Under: Linux Tagged With: apt, speedtest, ubuntu

Install OpenJDK 8

January 31, 2021

Here’s the installation instructions for OpenJDK 8.

For Fedora, Redhat and Oracle Linux.

yum install java-1.8.0-openjdk

yum install java-1.8.0-openjdk

For Debian and Ubuntu.

apt-get install openjdk-8-jre

apt-get install openjdk-8-jre

To see if the packages (symbolic links) are there, they can be found in /etc/alternatives/, at least in Redhat 7.

ls -l /etc/alternatives/

ls -l /etc/alternatives/

Filed Under: Misc Tagged With: 1.8.0, centos, java, jdk, jre, redhat, ubuntu

How To Remove Snap

July 7, 2020

Snap is cool, but not for everyone. To remove, follow these steps.

# get list
snap list
# remove snaps. repeat for each app.
snap remove chromium
# remove snapd
apt purge snapd
# remove snap from home
rm -rf ~/snap
# clean up cache
rm -rf /var/cache/snapd
apt purge snapd

# get list snap list # remove snaps. repeat for each app. snap remove chromium # remove snapd apt purge snapd # remove snap from home rm -rf ~/snap # clean up cache rm -rf /var/cache/snapd apt purge snapd

Filed Under: Linux Tagged With: purge, remove, snap, ubuntu

PHP 7.0 to 7.4 Upgrade

June 28, 2020

Here are steps I took to upgrade from PHP 7.0 to 7.4 on Ubuntu 18.04 LTS.

Login as root, otherwise use sudo for all commands.

# use 3rd party ppa repo
add-apt-repository ppa:ondrej/php
apt -y update
apt -y upgrade
# install php-core
apt install php7.4 php7.4-common php7.4-cli
# add all the php extenstions your app needs
apt install php7.4-curl php7.4-json php7.4-gd php7.4-mbstring
apt install php7.4-intl php7.4-bcmath php7.4-bz2 php7.4-xml
apt install php7.4-readline php7.4-zip php7.4-mysql
# I'm using apache prefork MPM, so install it
apt install libapache2-mod-php7.4
a2enmod php7.4
# check version. Success!
php -v
# for good measure, reboot apache
systemctl restart apache2.service
# Finally, purge the old PHP versions
apt purge php7.0 libapache2-mod-php7.0

# use 3rd party ppa repo add-apt-repository ppa:ondrej/php apt -y update apt -y upgrade # install php-core apt install php7.4 php7.4-common php7.4-cli # add all the php extenstions your app needs apt install php7.4-curl php7.4-json php7.4-gd php7.4-mbstring apt install php7.4-intl php7.4-bcmath php7.4-bz2 php7.4-xml apt install php7.4-readline php7.4-zip php7.4-mysql # I'm using apache prefork MPM, so install it apt install libapache2-mod-php7.4 a2enmod php7.4 # check version. Success! php -v # for good measure, reboot apache systemctl restart apache2.service # Finally, purge the old PHP versions apt purge php7.0 libapache2-mod-php7.0

Finally, run update on more time to get all the latest updates.

apt -y update
apt -y upgrade
apt -y autoremove
apt-get --with-new-pkgs upgrade

apt -y update apt -y upgrade apt -y autoremove apt-get --with-new-pkgs upgrade

Filed Under: Linux Tagged With: 7.0, 7.4, php, ubuntu, upgrade

Ubuntu Packages Kept Back

June 4, 2020

If you see packages are being kept back in Ubuntu, you can run the following to force an update.

sudo apt-get --with-new-pkgs upgrade

sudo apt-get --with-new-pkgs upgrade

Filed Under: Linux Tagged With: back, kept, packages, ubuntu, upgrade

Upgrade to Ubuntu 20.04 LTS

April 26, 2020

Now that Ubuntu 20.04 LTS (Long Term Support) is out, here’s a quick guide to upgrade to Ubuntu 20.04 LTS. You can ONLY upgrade from either Ubuntu 18.04 LTS or 19.10. If you have older versions of Ubuntu, it may not work. I suggest you back up your VM before running the upgrade, so you can quicky recover if something goes awry. This upgrade process will require sudo access.

# login as root
sudo -i
# check your current version
lsb_release -a
# update packages
apt update -y
apt upgrade -y
# reboot server
reboot
# remove old kernels
apt --purge autoremove
# install update manager core
apt install update-manager-core
# finally, perform the upgrade
do-release-upgrade -d
# reboot the server
reboot
# after reboot confirm
lsb_release -a

# login as root sudo -i # check your current version lsb_release -a # update packages apt update -y apt upgrade -y # reboot server reboot # remove old kernels apt --purge autoremove # install update manager core apt install update-manager-core # finally, perform the upgrade do-release-upgrade -d # reboot the server reboot # after reboot confirm lsb_release -a

Filed Under: Linux Tagged With: 20.04 LTS, release, ubuntu, update, upgrade

Tasksel Lampserver

January 24, 2020

Tasksel is a Debian/Ubuntu tool that installs multiple related packages as a co-ordinated “task” onto your system. It’s similar to meta-packages where tasks are dericed from from Ubuntu package managers like Synaptic or KPackageKit.

Here’s a quickway to install a lamp server.

# install tasksel first if you don't have it.
apt install tasksel
# install a lamp server package
tasksel install lamp-server

# install tasksel first if you don't have it. apt install tasksel # install a lamp server package tasksel install lamp-server

Filed Under: Linux Tagged With: easy, install, lamp-server, quick, tasksel, ubuntu

  • Go to page 1
  • Go to page 2
  • Go to page 3
  • Go to Next Page »
  • Home
  • About
  • Archives

Copyright © 2023