Freeze after login Ubuntu 18.04

You need to install your graphics drivers.

On your login page, press CTRL+ALT+F2

Enter your credentials and use the below commands (if you’re using Nvidia graphics card)

sudo add-apt-repository ppa:graphics-drivers/ppa 
sudo apt-get update 
sudo apt-get install nvidia-390

If you’re using some other graphics card then use the related command.

Difference Between apt and apt-get Explained

Brief: This article explains the difference between apt and apt-getcommands of Linux. It also lists some of the most commonly used apt commands that replace the older apt-get commands.

One of the noticeable new features of Ubuntu 16.04 was the ‘introduction’ of apt command. The reality is that the first stable version of apt was released in the year 2014 but people started noticing it in 2016 with the release of Ubuntu 16.04.

It became common to see apt install package instead of the usual apt-get install package. Eventually, many other distributions followed Ubuntu’s footsteps and started to encourage users to use apt instead of apt-get.

You might be wondering what’s the difference between apt-get and apt? And if they have a similar command structure, what was the need for the new apt command? You might also be thinking if apt is better than apt-get? Should you be using the new apt command or stick with the good old apt-get commands?

I’ll explain all these questions in this article and I hope that by the end of this article, you’ll have a clearer picture.

apt vs apt-get

What's the difference between apt vs apt-get

Just a quick word for Linux Mint users. A few years ago, Linux Mint implemented a python wrapper called apt that actually uses apt-get but provides more friendly options. This apt which we are discussing here is not the same as the one in Linux Mint.

Before we see the difference between apt and apt-get, let’s go into the backdrop of these commands and what exactly they try to achieve.

Why apt was introduced in the first place?

Debian, mother Linux of distributions like Ubuntu, Linux Mint, elementary OS etc, has a robust packaging system and every component and application is built into a package that is installed on your system. Debian uses a set of tools called Advanced Packaging Tool (APT) to manage this packaging system. Don’t confuse it with the command apt, it’s not the same.

There are various tools that interact with APT and allow you to install, remove and manage packages in Debian based Linux distributions. apt-get is one such command-line tool which is widely popular. Another popular tool is Aptitude with both GUI and command-line options.

If you have read my guide on apt-get commands, you might have come across a number of similar commands such as apt-cache. And this is where the problem arises.

You see, these commands are way too low level and they have so many functionalities which are perhaps never used by an average Linux user. On the other hand, the most commonly used package management commands are scattered across apt-get and apt-cache.

The apt commands have been introduced to solve this problem. apt consists some of the most widely used features from apt-get and apt-cache leaving aside obscure and seldom used features. It can also manage apt.conf file.

With apt, you don’t have to fiddle your way from apt-get commands to apt-cache. apt is more structured and provides you with necessary options needed to manage packages.

Bottom line: apt=most common used command options from apt-get and apt-cache.

Suggested read
Using Snap Packages In Ubuntu [Complete Beginners Guide]

Difference between apt and apt-get

So with apt, you get all the necessary tools in one place. You won’t be lost under tons of command options. The main aim of apt is to provide an efficient way of handling package in a way “pleasant for end users”.

When Debian says “pleasant for end users”, it actually means that. It has fewer but sufficient command options but in a more organized way. On top of that, it enables a few options by default that is actually helpful for the end users.

For example, you get to see the progress bar while installing or removing a program in apt.

apt vs apt-get difference
apt shows the progress bar

apt also prompts you with the number of packages that can be upgraded when you update the repository database.

difference apt and apt-get
apt shows the number of packages that can be upgraded

You can achieve the same with apt-get as well if you use additional command options. apt enables them by default and takes the pain away.

Suggested read
Using apt-get Commands In Linux [Complete Beginners Guide]

Difference between apt and apt-get commands

While apt does have some similar command options as apt-get, it’s not backward compatible with apt-get. That means it won’t always work if you just replace the apt-get part of an apt-get command with apt.

Let’s see which apt command replaces which apt-get and apt-cache command options.

apt command the command it replaces function of the command
apt install apt-get install Installs a package
apt remove apt-get remove Removes a package
apt purge apt-get purge Removes package with configuration
apt update apt-get update Refreshes repository index
apt upgrade apt-get upgrade Upgrades all upgradable packages
apt autoremove apt-get autoremove Removes unwanted packages
apt full-upgrade apt-get dist-upgrade Upgrades packages with auto-handling of dependencies
apt search apt-cache search Searches for the program
apt show apt-cache show Shows package details

apt has a few commands of its own as well.

new apt command function of the command
apt list Lists packages with criteria (installed, upgradable etc)
apt edit-sources Edits sources list

One point to note here is that apt is under continuous development. So you may see a few new options added to the command in the future versions.

If you are interested in learning more, I recommend reading my guide that shows how to use apt commands with examples.

Is apt-get deprecated?

I didn’t find any information that says that apt-get will be discontinued. And it actually shouldn’t be. It still has a lot more functionalities to offer than apt.

For low-level operations, in scripting etc, apt-get will still be used.

Should I use apt or apt-get?

You might be thinking if you should use apt or apt-get. And as a regular Linux user, my answer is to go with apt.

apt is the command that is being recommended by the Linux distributions. It provides the necessary option to manage the packages. Most important of all, it is easier to use with its fewer but easy to remember options.

I see no reason to stick with apt-get unless you are going to do specific operations that utilize more features of apt-get.

Suggested read
Using apt Commands in Linux [Complete Guide]

Conclusion

I hope I was able to explain the difference between apt and apt-get. In the end, to summarize the apt vs apt-get debate:

  • apt is a subset of apt-get and apt-cache commands providing necessary commands for package management
  • while apt-get won’t be deprecated, as a regular user, you should start using apt more often

So what do you think? Are you already using apt or do you want to stick with the good old apt-get? Share your views in the comment section below.

How to Update the Windows Bash Shell to Ubuntu 16.04

Starting with the Windows 10 Creators Update, anyone who installs the Bash environment will get Ubuntu 16.04 (Xenial). But, if you’ve previously installed Bash in the Anniversary Update, you’ll be stuck with Ubuntu 14.04 (Trusty) until you manually upgrade.

Ubuntu 16.04 contains more modern, up-to-date software packages. Ubuntu 14.04 was originally released in April, 2014, while Ubuntu 16.04 was released in April, 2016.

Update: Starting with the Fall Creators Update, Linux distributions are now delivered via the Store. If you previously installed the Ubuntu Bash environment, just open the Microsoft Store, search for “Ubuntu”, and install it to get the latest version.

How to Check Which Version of Ubuntu You Have

RELATED: Everything You Can Do With Windows 10’s New Bash Shell

If you’re not sure which version of Ubuntu is being used in your current Bash environment, open a Bash window and run the following command:

lsb_release -a

It’ll show you whether you’re running Ubuntu 14.04 or Ubuntu 16.04. If you’re running Ubuntu 14.04 and want to upgrade, read on. But ensure you have the Creators Update installed: You can’t upgrade to Ubuntu 16.04 LTS without upgrading to the Creators Update first.

Option One: Uninstall and Reinstall Bash With lxrun

RELATED: How to Uninstall (or Reinstall) Windows 10’s Ubuntu Bash Shell

If you don’t care about any customizations you’ve made to your bash environment (or you’re prepared to customize it again), you don’t have to worry about performing an Ubuntu upgrade. You can simply remove your current Ubuntu image and then tell Windows to reinstall a new Ubuntu image. This is the fastest way to upgrade your Bash environment.

To do this, first open a Command Prompt window by right-clicking the Start button or pressing Windows+X on your keyboard and selecting “Command Prompt”. Run the following command to uninstall the Bash shell. This will keep your Linux user account’s files and preferences, but will erase the system files, including any installed programs and system-level settings changes.

lxrun /uninstall

Type y to continue and Windows will uninstall the Ubuntu 14.04 Bash environment.

Your Bash system files are now removed. To reinstall Bash—which will give you Ubuntu 16.04 instead of Ubuntu 14.04—run the following command:

lxrun /install

Type y to continue and Windows will install the Ubuntu 16.04 Bash environment. Windows will automatically suggest you use the same username you used previously. You’ll be asked to enter a password after.

When it’s done, run the lsb_release -a command once again and you’ll see you’re now using Ubuntu 16.04. You have access to the newer software available in Ubuntu 16.04’s package repositories.

Option Two: Upgrade Ubuntu With do-release-upgrade

If you’ve customized your Bash environment and installed software, you may not want to completely erase everything. In this case, you can perform an upgrade command from within the Bash shell. This will upgrade Ubuntu from version 14.04 to 16.04, just like you’d upgrade a full Ubuntu environment to a new release. However, this will take longer than simply removing and reinstalling the Bash files.

To do this, open the Bash shell and run the following command:

sudo do-release-upgrade

This is the process officially recommended by Microsoft.

How to use Clonezilla

FIRST OF ALL, BACK UP IMPORTANT DATA BEFORE YOU USE CLONEZILLA LIVE TO DO ANYTHING.

In this example, the machine has 1 disk (8 GB), we want to clone it to an external disk (20 GB). This is a normal case when you buy a new disk to replace old disk on your machine. Here since we use virtual machine to give this example, we use small disk size, i.e. 8 GB to 20 GB instead of modern disk size.
Besides, modern “light” laptop normally comes WITHOUT CD drive, or you happen to leave your USB CD drive in another place, it’s a good idea to use USB device to boot Clonezilla live. In this example, we use a better, neater method, i.e. put Clonezilla live on the new disk and use it to boot clonezilla live. By doing this, you do not have to burn a CD, or prepare another USB flash drive. This is an one-time-use Clonezilla live, because later the clonezilla live files on new disk will be overwritten. Of course, you still can put Clonezilla live in CD or USB flash drive, then boot it to clone the 8 GB disk to 20 GB disk. The procedure is quite similar. Just remember to choose the correct source and destination disk.
Prerequisite: A new, equal or larger disk, an external disk closure, an USB cable. A running MS Windows or GNU/Linux.

  • Put the new disk inside your external disk closure, connect that to your running MS Windows or GNU/Linux via USB cable, then follow here to put Clonezilla live zip file on your external disk and make it bootable.

 

  • Insert the new hard drive (which is bootable with Clonezilla live builtin) with the USB cable to your machine.
  • Most modern PC comes with USB boot function, you can refer to your montherboard manul to see how to set it during boot. E.g. On the IBM thinkpad X61, you can press F12 and choose USB device to force the machine to boot via USB device.

 

In the boot menu, we choose “Other modes of Clonezilla live”
Then choose “Clonezilla live (To RAM. Boot media can be removed later)”
By doing this, all the Clonezilla live file on the new hard drive will be copied to RAM. Therefore the partition of new hard drive can be released, i.e. it won’t be busy and locked by running programs.
Press Enter, you will see Debian Linux booting process, and it will spend a few minutes when copying the files to RAM:

 

 

The default keyboard layout is US keybaord, therefore if you are using US keyboard, just press enter (i.e. use the option “Don’t touch keymap”).
If you want to change keymap, you can either choose “Select keymap from arch list” or “Select keymap from full list”.
///NOTE/// There is a bug when choosing French keymap in “Select keymap from arch list”, so use “Select keymap from full list” to change keymap if you are using French keyboard.

 

Choose “device-device”

Choose “Beginner”

If you choose “Expert” mode, you will have some chances to choose advanced parameters, e.g. tune the CHS values of target disk, how to create partition table on the target disk, etc.. You can see more details here.

///NOTE/// By deafult, Clonezilla will clone the “same” size of source disk to target disk. i.e. in this example, only 8 GB will be cloned to target disk, so the rest of 12 GB on the destination disk will be unallocated. If you want to make use all of the target disk size, remember to enter “Expert” mode and choose option “-k1”.

 

 

Here the source disk is sda, which is 8 GB in size”.
///WARNING/// Be careful! Do not choose the wrong disk. Since all the data on the target disk will be overwritten!!! 

 

Here the target disk is sdb, which is 20 GB in size”
///WARNING/// Be careful! Do not choose the wrong disk. Since all the data on the target disk will be overwritten!!! 
Select if the source file system need to be checked or not:
Select the mode you want after the disk cloning is done:

By default we will choose later, but if you have decided, you can choose to reboot or poweroff the machine.

Clonezilla shows you the complete command to run this disk to disk clone action: 

 

Before doing the real cloning, Clonezilla will ask confirmation:
Ask confirmation agin:
First ask confirmation about cloning boot loader to target disk:

Then it will create partition table on the destination disk:

Clonezilla is cloning the data from source disk to target disk:

 

When everything is done, Clonezilla will prompt you if about reboot, poweroff, etc. 

Then we choose poweroff:

and the machine will be halted:

That’s all. The new hard drive is ready to be used. You can remove the old (8 GB) disk from your machine, and put the new one (20 GB) in your machine. Boot it, you can enjoy the new disk.
//NOTE// You can only keep one of the disks in the same machine before you boot it. If you boot the machine with the source disk and the cloned destination disk on the same machine, the booting OS will be confused since there are two identical file systems on the same machine. They have same UUID so the booting OS might mount the wrong file system.

Using Clonezilla to clone a HDD to SSD

Question
I am having a major issue trying to copy a 300GB HDD to a 120GB SSD. I have chosen to use Clonezilla as this has never let me down before, I have used Gparted to resize the larger drive down to just over 100GB. After thats done I boot into Windows and let ChkDsk do its thing before then booting back into Clonezilla. I can confirm that i can see both drives listed for selection and carefully chose the Source and Target, the first two smaller partitions copy over fine however on the third and ‘main’ partition the copy gets to between 50/70% and then freezes copying.
I have googled and tried as many of the different options that Clonezilla offers that I can but all do the exact same thing. We even tried setting up the partitions on the new drive and doing a partition to partition clone but same result. To make sure there is no issue with the SSD we even tried a larger drive but again this did the same thing.

I dont know how much difference it will make but the machine is a Dell Latitude laptop, the HDD is a Toshiba 300GB and the SSD is a 120GB Samsung.

Answer
The way I have done this in the past is by doing a disk to disk clone, choosing advanced options as opposed to beginner mode and then choose or check -icds “Skip checking destination disk size before creating partition table”. Something else to keep in mind is to make sure that Clonezilla is running live from the USB stick or DVD rather than running from RAM. If you have a dedicated Clonezilla disk this is the default (and I think only option), but if you are running Clonezilla from another distribution such as Parted Magic where the default is to write everything to RAM and run from there, Clonezilla may fail like this because basically you run out of RAM and it simply stops copying.

How To Upgrade to Ubuntu 18.04 Bionic Beaver

Introduction

The Ubuntu operating system’s latest Long Term Support (LTS) release, Ubuntu 18.04 (Bionic Beaver), was released on April 26, 2018. This guide will explain how to upgrade an Ubuntu system of version 16.04 or later to Ubuntu 18.04.

Warning: As with almost any upgrade between major releases of an operating system, this process carries an inherent risk of failure, data loss, or broken software configuration. Comprehensive backups and extensive testing are strongly advised.

To avoid these problems, we recommend migrating to a fresh Ubuntu 18.04 server rather than upgrading in-place. You may still need to review differences in software configuration when upgrading, but the core system will likely have greater stability. You can follow our series on how to migrate to a new Linux server to learn how to migrate between servers.

Prerequisites

This guide assumes that you have an Ubuntu 16.04 or later system configured with a sudo-enabled non-root user.

Potential Pitfalls

Although many systems can be upgraded in place without incident, it is often safer and more predictable to migrate to a major new release by installing the distribution from scratch, configuring services with careful testing along the way, and migrating application or user data as a separate step.

You should never upgrade a production system without first testing all of your deployed software and services against the upgrade in a staging environment. Keep in mind that libraries, languages, and system services may have changed substantially. Before upgrading, consider reading the [Bionic Beaver Release Notes][https://wiki.ubuntu.com/bionicbeaver/releasenotes] and our article What’s New in Ubuntu 18.04.

Step 1 – Backing Up Your System

Before attempting a major upgrade on any system, you should make sure you won’t lose data if the upgrade goes awry. The best way to accomplish this is to make a backup of your entire filesystem. Failing that, ensure that you have copies of user home directories, any custom configuration files, and data stored by services such as relational databases.

On a DigitalOcean Droplet, one approach is to power down the system and take a snapshot (powering down ensures that the filesystem will be more consistent). See [How To Use DigitalOcean Snapshots to Automatically Backup your Droplets][https://www.digitalocean.com/community/tutorials/how-to-use-digitalocean-snapshots-to-automatically-backup-your-droplets] for more details on the snapshot process. After you have verified that the Ubuntu update was successful, you can delete the snapshot so that you will no longer be charged for its storage.

For backup methods which will work on most Ubuntu systems, see [How To Choose an Effective Backup Strategy for your VPS][https://www.digitalocean.com/community/tutorials/how-to-choose-an-effective-backup-strategy-for-your-vps].

Step 2 – Updating Currently Installed Packages

Before beginning the release upgrade, it’s safest to update to the latest versions of all packages for the current release. Begin by updating the package list:

  • sudo apt-get update

Next, upgrade installed packages to their latest available versions:

  • sudo apt-get upgrade

You will be shown a list of upgrades, and prompted to continue. Answer y for yes and press Enter.

This process may take some time. Once it finishes, use the dist-upgrade command with apt-get, which will perform any additional upgrades that involve changing dependencies, adding or removing new packages as necessary. This will handle a set of upgrades which may have been held back by apt-get upgrade:

  • sudo apt-get dist-upgrade

Again, answer y when prompted to continue, and wait for upgrades to finish.

Now that you have an up-to-date installation of Ubuntu, you can use do-release-upgrade to upgrade to the 18.04 release.

Step 3 – Upgrading with Ubuntu’s do-release-upgrade Tool

Traditionally, Ubuntu releases have been upgradeable by changing Apt’s /etc/apt/sources.list – which specifies package repositories – and using apt-get dist-upgrade to perform the upgrade itself. Though this process is still likely to work, Ubuntu provides a tool called do-release-upgrade to make the upgrade safer and easier.

do-release-upgrade handles checking for a new release, updating sources.list, and a range of other tasks, and is the officially recommended upgrade path for server upgrades which must be performed over a remote connection.

Start by running do-release-upgrade with no options:

  • sudo do-release-upgrade

If the new Ubuntu version has not been officially released yet, you may get the following output:

Output
Checking for a new Ubuntu release
No new release found

If this is the case, add the -d option to upgrade to the development release:

  • sudo do-release-upgrade -d

If you’re connected to your system over SSH, you’ll be asked whether you wish to continue. For virtual machines or managed servers you should keep in mind that losing SSH connectivity is a risk, particularly if you don’t have another means of remotely connecting to the system’s console. For other systems under your control, remember that it’s safest to perform major operating system upgrades only when you have direct physical access to the machine.

At the prompt, type y and press Enter to continue:

Output
Reading cache

Checking package manager

Continue running under SSH?

This session appears to be running under ssh. It is not recommended
to perform a upgrade over ssh currently because in case of failure it
is harder to recover.

If you continue, an additional ssh daemon will be started at port
'1022'.
Do you want to continue?

Continue [yN] y

Next, you’ll be informed that do-release-upgrade is starting a new instance of sshd on port 1022:

Output
Starting additional sshd

To make recovery in case of failure easier, an additional sshd will
be started on port '1022'. If anything goes wrong with the running
ssh you can still connect to the additional one.
If you run a firewall, you may need to temporarily open this port. As
this is potentially dangerous it's not done automatically. You can
open the port with e.g.:
'iptables -I INPUT -p tcp --dport 1022 -j ACCEPT'

To continue please press [ENTER]

Press Enter. Next, you may be warned that a mirror entry was not found. On DigitalOcean systems, it is safe to ignore this warning and proceed with the upgrade, since a local mirror for 18.04 is in fact available. Enter y:

Output
Updating repository information

No valid mirror found

While scanning your repository information no mirror entry for the
upgrade was found. This can happen if you run an internal mirror or
if the mirror information is out of date.

Do you want to rewrite your 'sources.list' file anyway? If you choose
'Yes' here it will update all 'xenial' to 'bionic' entries.
If you select 'No' the upgrade will cancel.

Continue [yN] y

Once the new package lists have been downloaded and changes calculated, you’ll be asked if you want to start the upgrade. Again, enter y to continue:

Output
Do you want to start the upgrade?


6 installed packages are no longer supported by Canonical. You can
still get support from the community.

9 packages are going to be removed. 104 new packages are going to be
installed. 399 packages are going to be upgraded.

You have to download a total of 232 M. This download will take about
46 seconds with your connection.

Installing the upgrade can take several hours. Once the download has
finished, the process cannot be canceled.

 Continue [yN]  Details [d]y

New packages will now be retrieved, unpacked, and installed. Even if your system is on a fast connection, this will take a while.

During the installation, you may be presented with interactive dialogs for various questions. For example, you may be asked if you want to automatically restart services when required:

Service Restart Dialog

In this case, it is safe to answer Yes. In other cases, you may be asked if you wish to replace a configuration file that you have modified. This is often a judgment call, and is likely to require knowledge about specific software that is outside the scope of this tutorial.

Once new packages have finished installing, you’ll be asked whether you’re ready to remove obsolete packages. On a stock system with no custom configuration, it should be safe to enter y here. On a system you have modified heavily, you may wish to enter d and inspect the list of packages to be removed, in case it includes anything you’ll need to reinstall later.

Output
Remove obsolete packages?


53 packages are going to be removed.

 Continue [yN]  Details [d]y

Finally, assuming all has gone well, you’ll be informed that the upgrade is complete and a restart is required. Enter y to continue:

Output
System upgrade is complete.

Restart required

To finish the upgrade, a restart is required.
If you select 'y' the system will be restarted.

Continue [yN] y

On an SSH session, you’ll likely see something like the following:

Output
Connection to 203.0.113.241 closed by remote host.
Connection to 203.0.113.241 closed.

You may need to press a key here to exit to your local prompt, since your SSH session will have terminated on the server end.

Wait a moment for your server to reboot, then reconnect. On login, you should be greeted by a message confirming that you’re now on Bionic Beaver:

Output
Welcome to Ubuntu 18.04 LTS (GNU/Linux 4.15.0-19-generic x86_64)

Conclusion

You should now have a working Ubuntu 18.04 installation. From here, you likely need to investigate necessary configuration changes to services and deployed applications.

You can find more 18.04 tutorials on our Ubuntu 18.04 Tutorials tag page.

How To Fix Rats WebGL Hit A Snag Error

Have you had this problem: “Rats! WebGL hit a snag.” Usually, you get this message in the error bar on Google Chrome. So what is it all about? Before we tell you about it, let’s understand a little about WebGL. WebGL or Web Graphics Library is a JavaScript API that helps with rendering interactive 3D computer graphics and 2D graphics on any compatible web browser, without requiring the use of plug-ins. It enables GPU accelerated image processing and the use of physics. WebGL programs consist of code written in JavaScript and are executed on the computer’s GPU or Graphics Processing Unit. The non-profit, Khronos Group designs and maintains WebGL.

WebGL works as a thin wrapper around OpenGL. OpenGL is a low level library used for drawing 2D graphics. Basically, OpenGL gives us the ability to push data to the GPU, and then to execute specialized code on the GPU itself rather than on the CPU. WebGL helps to optimize the performance of browsers, JavaScript and graphics drivers when it comes to 2D and 3D graphics. In fact, WebGL is the best way to bring 3D everywhere. It allows you to write once, run everywhere.

Fix Rats Webgl Hit A Snag Error Chrome

Fix Rats Webgl Hit A Snag Error Chrome

When using WebGL, you may have had a problem with a site falling back to canvas rendering if WebGL is not supported or is found to have an error. When using WebGL in Google Chrome, an error message bar appears – “Rats! WebGL hit a snag.” It does not disappear till you do something about it.

If you try reloading the page or navigating to a different one, the message reappears the next time you use WebGL. In fact, you get the error message every time a web page tries to access WebGL. And once the error occurs, Chrome will not use WebGL on the same site again, until and unless you specifically reload it.

So, the “Rats! WebGL hit a snag” message does not indicate continuous errors, but just that you have been making continuous attempts to use WebGL. You can fix the problem and solve your page rendering issues by disabling hardware accelerated graphics from the settings in Google Chrome.

What is WebGL?

Web Graphics Library also known as the “WebGL” is a Javascript API which Renders interactive 3D computer graphics and Graphics(2D) on any web browser that is Compatible without needing any plug-ins or add-ons.

The Computer’s GPU or also known as Graphics Processing Unit helps the execution of the Javascript which has all the webGL program Codes.

The Group popularly known as the “Khronos Group designs and maintains WebGL, and it is a non-profit group, situated in Beaverton, Oregon (USA).

Usage of WebGL

WebGL acts as a thin sheet of cloth around OpenGL which is a used for drawing 2D graphics (Low-Level Library). It helps in pushing data to the GPU, and execution of the specialized code on the GPU itself.

WebGL is the easy and best way to bring 3D graphics and also 2D everywhere. Once written, it can run Everywhere. WebGL apart from used in 3D wed design and gaming, it also has amazed scientists for research and scientific works.A book named “Cellular Automata” have used this technology to simulate Debris flow.

Did you know? NASA, Yes “NASA” developed an interactive web application called experience curiosity to celebrate the 3rd anniversary of the famous Curiosity rover landing on Mars.

How to Fix Rats! WebGL Hit A Snag

Sometimes when using WebGL we have an error about site crashing and telling us that WebGL is not supported. You will come across an error message saying “Rats! WebGL hit a snag” while surfing on Chrome browser.

Even if we try to Reload the web page or try to go to another one, the message reappears. In fact, we get an error message every time browser try to access WebGL.

Note: – This error message does not indicate continuous errors but appears whenever someone is trying to make constant attempts to use WebGL.

Fix #1 Disabling Hardware Accelerated Graphics in Chrome

  • We can fix this problem by disabling hardware accelerated graphics from the settings in google chrome. Follow the steps mentioned below.
  • Navigate to chrome://settings>>show advanced settings.
  • There you can see an option “use hardware acceleration when available”.
  • Uncheck it and Restart your browser to make the changes live.

Fix #2 Disable WebGL

  • Go to chrome://flags. Search for the option “Disable WebGL.
  • Enable this option and restart your browser.
  • It is very unlikely that your problem still Persist But if you encounter this error then there is another way to tackle it.

Fix #3 Chrome GPU

  • Navigate to Chrome://GPU.
  • Here under the Problems detected heading, Check for any unusual red warnings, as I have shown in the picture below.

By this, you can figure out what the problem is, and what exactly is making that error message pop. But as I said earlier Fix 1 & 2 would work for you like a Charm.

How To Upgrade Ubuntu To 18.04 LTS Bionic Beaver

Run your Ubuntu Update

Before you do anything, make sure that your system is already up-to-date. Run a full Ubuntu update and upgrade with Apt.

$ sudo apt update 
$ sudo apt upgrade
$ sudo apt dist-upgrade

This will help to ensure that the difference between packages is as small as possible. It also will be the way that Canonical has most likely tested the upgrade themselves, so it’s least likely to encounter bugs. Lastly, before you begin to upgrade Ubuntu to 18.04 LTS you may also want to remove all no longer required packages using:

$ sudo apt autoremove


How to Upgrade Ubuntu The Ubuntu Way

Ubuntu have developed their own automatic way of upgrading between releases. It essentially scripts the traditional Debian approach. This way, you can set it up to upgrade and walk away. Ubuntu will handle the rest.

Upgrades from 17.10 will not be enabled until a few days after 18.04’s release. Upgrades from 16.04 LTS will not be enabled until a few days after the 18.04.1 release expected in late July. There are no offline upgrade options for Ubuntu Desktop and Ubuntu Server.
SOURCEwiki.ubuntu.com

If you want to take this route, you’re going to need to install one package first. So, do that.

$ sudo apt install update-manager-core

When that finishes, run the Ubuntu upgrade utility.

$ sudo do-release-upgrade

If you’re doing this too soon, it will tell you that there is No new release found. In that case, and at your own risk, add the -d flag at the end of the command to force the upgrade. For more information read the below “No new release found” section.

$ sudo do-release-upgrade -d

 

Ubuntu release upgrade tool

Ubuntu will ask you a couple of questions about how you want to handle the upgrade, and it’ll start off upgrading your system.

No new release found

As already mentioned above, upgrades from 17.10 will not be enabled until a few days after 18.04’s release and upgrades from 16.04 LTS will not be enabled until a few days after the 18.04.1 release which is expected in late July 2018.

As a result, your upgrade attempt may result in a message No new release found while trying to upgrade your Ubuntu system by using sudo do-release-upgrade command. In this case read the following sections.

Upgrading from Ubuntu 16.04 LTS

Start by executing the sudo do-release-upgrade command. In case you receive the No new release found message you have four options:

  • The first and recommended approach is to simply wait. Direct upgrades from Ubuntu 16.04 LTS to Ubuntu 18.04 LTS will most likely be unavailable until late July 2018.
  • Force direct upgrade by using the -d switch. In this case sudo do-release-upgrade -d will force upgrade from Ubuntu 16.04 LTS to Ubuntu 18.04 LTS. In case you receive an “Upgrades to the development release are only available from the latest supported release.” message, make sure that release upgrader default behavior is set to ltswithin /etc/update-manager/release-upgrades.
  • Upgrade to 17.10 first by changing the default behavior of the release upgrader to normalwithin the /etc/update-manager/release-upgrades file. When ready, execute the sudo do-release-upgrade command again. Once your system is upgraded to Ubuntu 17.10 then follow the Ubuntu 17.10 to Ubuntu 18.04 upgrade procedure while keeping the release upgrader behavior set to normal.
  • Use the Debian way described below to upgrade your Ubuntu 16.04 system.

Upgrading from Ubuntu 17.10

Start by executing the sudo do-release-upgrade command. In case you receive the No new release foundmessage, ensure that the default release upgrader is set to normal and re-execute the sudo do-release-upgrade command.

How to Upgrade Ubuntu The Debian Way

Change Your Sources

If you’ve selected the traditional Debian path, you’re going to need to change the /etc/apt/sources.list file and replace the name of your previous release with bionic. So, if you’re on 16.04, replace every instance of xenial with bionic. If you currently have 17.10, replace artful with bionic.

This process can be automated by using the following sed command:

$ sudo sed -i 's/xenial/bionic/g' /etc/apt/sources.list

Ubuntu Bionic Beaver Sources

Then, look in /etc/apt/sources.list.d/. Change any files in there the same way. If you end up getting an error when you try to update Ubuntu, use artful until those repositories are updated.



Ubuntu Update and Ubuntu Upgrade

Now, you can run the Ubuntu dist upgrade. First, update the Apt sources. Then, run the Ubuntu upgrade.

$ sudo apt update && sudo apt -y dist-upgrade

Upgraded Ubuntu 16.04 Xenial Xerus to Ubuntu 18.04 Bionic Beaver

Upgraded Ubuntu 16.04 system to Ubuntu 18.04

The upgrade should take a bit of time. Chances are, every package on the system will be upgraded. When the Ubuntu upgrade does finish, reboot the system. When the system comes back up, you’ll be running Ubuntu 18.04 LTS Bionic Beaver!

Closing Thoughts

That’s all there really is to it. You should notice that your login screen is different, especially if you were on 16.04. Depending on your choices during the Ubuntu dist upgrade, the system may automatically make the switch from Unity to GNOME for you. This procedure will also work on servers. It’s exactly the same. Just be especially careful of any external repositories and version upgrades like PHP.