Change Your DNS Servers To Google’s In Lubuntu

This article will show you how to change your DNS servers from your default servers to the DNS servers run by Google, specifically while you’re using Lubuntu. If  you’re not using Lubuntu, the process is likely fairly similar. Either way, it should be a nice and fun article, and we’ll even do it in the GUI instead of the terminal.

So, what is DNS? DNS stands for ‘Domain Name System’. As you know by now, machines are identified by their IP address. It’d suck to have to remember numbers instead of names. It’s also possible to route multiple domain names to the same IP address. So, we have domain names and use those domain names to resolve to IP addresses.

If you’re like most people, right now the DNS servers you’re using have come from your ISP – the folks who provide your internet service. This means that they can see which sites you visit, based on the requests you make to the DNS service.

Some folks don’t like this and prefer to find another DNS provider. (There’s also Secure DNS which this article will not be touching on.) One of those companies that provides free DNS servers is Google. Like them or not, their DNS servers are robust and consistently updated, often making domain propagation quicker for you.

This article is for Lubuntu, as stated above, but you may very well be able to follow the same exact steps with your distro of choice. And, now that you have a general idea of what’s going on, let’s learn how to…

Change Your DNS Servers:

To get started with changing your DNS servers, you need to find your networking icon in your system tray. It’ll be down on the right, not far from the clock. Once you have found it, right click on it so that it brings up the menu to let you “Edit Connections”. It will look something like this:

change network settings
Of course, your version won’t have the nifty arrow.

You’ll want to click the gear icon. That’s why I put the arrow there! 

That will open another window. This window will have tabs  you need to worry about – or a tab you need to know about. You probably shouldn’t need both. The tabs you’re interested in will look like this:

changing the network connections
You should need one of those, probably not both of those…

Now,  you should only need to edit one of those. If you’re still using IPv4 then you use that tab. If you’re using IPv6 then you’ll obviously want to use the appropriate tab. For example, the IPv4 would look like this:

screen to edit dns servers
This would be the tab you’re looking for, pretty much…

Now, where that arrow is is where you want to enter the new DNS server information. You separate them with a comma, though you can use a comma and a space – there will need to be a comma.

For Google’s IPv4 addresses, your choices for 8.8.8.8 and 8.8.4.4.

For Google’s IPv6 addresses, your choices are 2001:4860:4860::8888 and 2001:4860:4860::8844.

Note: The ifconfig or ip addr will help you tell if you have IPv4 or IPv6.

When you’re done, be sure to click the save button to ensure your new settings take effect. Remember the screen and changes, should things go pear shaped. You can undo this easily enough.

This will, of course, work with any set of DNS servers out there. You can use it with other servers if you aren’t a fan of Google. This can serve as a general guideline for other servers, should you wish.

Closure:

Yup… There it is. You have another article. This time, it tells you how to change your DNS servers if you use Lubuntu. Again, it’ll work for other distros, but I’m only including pictures/vouching for it with Lubuntu.

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

Review: It Appears That uMatrix Is Back Under Development

This article is a bit of a review of some software called ‘uMatrix’. If you’ve never heard of it, it’s an impressive piece of software – especially considering it’s a browser extension.

I was nosing around some old projects in my GitHub when I decided to look upstream. Lo and behold, Ray Hill (gorhill of uBlock Origin fame) has picked up developing uMatrix again. (Install through your browser’s extension manager. Links below.)

What is uMatrix? GitHub page here.

Well, do you remember old school firewalls where you could not just block things by application, you could be even more refined – like narrowing it down to which port, ingress or egress, and even which domains that application could connect with?

Imagine something similar to that, except it’s for your browser. For each page, you can elect to block images, CSS, cookies, scripts. Then, you can decide which scripts and which CSS to allow through. You can elect which third party assets load, from cookies to images – and you can do so on a domain name basis.

There’s a learning curve. It’s a pretty big learning curve for a browser extension. Plan on a couple of hours to really get used to it – and to get your favorite sites configured. You need only configure them once and then you can backup the settings so that you can use it on multiple devices or put it aside for safekeeping. 

It WILL break sites. You WILL get frustrated.

More About uMatrix:

If I took privacy serious and were more security focused, I would not use the internet without uMatrix. As it stands, I have an older version (now updated) configured in one browser for when I want to visit stuff I absolutely don’t trust. If you take privacy serious (and cross-domain scripting, third party cookies are a huge no-no, but so shouldn’t images and CSS files) then you really, really should take a look at this extension.

Take a look at this:

uMatrix in Opera.
Look a little daunting? You can figure it out. I have faith in you!

In each of those columns, you can click to block it everywhere or to allow it on this one specific domain. As you can see, there’s everything from cookies to CSS, from media to scripts. The refinement you can achieve is amazing. It will take some work and time for you to ‘get good’ with uMatrix.

Now, you basically want it to operate in the default configuration you have it in right after installing, only allowing CSS and images from the domain you’re visiting.

When a site refuses to work properly, you can start by allowing scripts on an individual basis – on the per-site basis you see from the domains listed on the left. You can click on two areas in each column to give fine-grained permissions. After a while, you can get pretty quick at deducing why it doesn’t work. It’s usually a script from another site that needs to be enabled.

You’ll also learn how much cruft the web has, browsing much faster and having fewer scripts chew up your CPU and RAM. If you have a low-end computer, this is also a must-have.

At one point, Hill had stopped working on the project and shuttered it. I’m not sure when he started working on it again. I’m glad they did because it’s the best privacy and security browser extension I’ve ever seen in my life. Now that he’s working on it again, I feel comfortable recommending it.

uMatrix Review:

Really, I wrote this to share my joy. If I had to review it, and I guess I have to, I’d give it a solid 9.5 out of 10. I’ve deducted a half point because there’s no effort to make it all that intuitive to new people and this makes the learning curve harder. It’s hard to explain, but once you see what it does you will understand it better.

Not even I can make it all that intuitive until you actually test it out and start browsing the web with it. If you get frustrated, settle down and relax. You can make it work. It will take some time to get used to the new paradigm. You can browse much faster (more so than from just blocking ads) when you’re not loading a bunch of 3rd party cruft.

You might as well know where to get it. It’s available for the two major browsers, plus in Opera’s own little extension store. These extensions work fine on same-family browsers, like Pale Moon or Google Chromium.

You can pick it up for Opera here.

Of course, you can pick it up for Firefox here.

And you can pick it up for Google Chrome here.

Give it a shot. Commit to browsing with it for a full day and see for yourself what the web is like when  you’re not loading tracking cookies, scripts, ad images loaded from other domain names, and so much more.

By the way…

I worried more about these things years ago, back when I was a Windows user and for the times when broadband wasn’t a realistic option. I was more concerned with my security and letting scripts load in the browser, so I’d use uMatrix. It had the added benefit of doing a great deal to protect my privacy by making it extremely difficult to track my movements across the web. These days, browsers are much more secure and run in their own containers and I care less about privacy.

Even just blocking remote scripts, media, and images will speed up your browsing noticeably. By the time you have it configured for the sites you visit, you’ll have a pretty secure and private browsing experience. You should also consider making it work in incognito mode if you make regular use of private browsing.

Closure:

There you have it, another article. This one is a review of uMatrix, one of my favorite browser extensions even though I don’t actually bother with it for most of my browsing. I used to browse with it exclusively, but I’ve given up caring. If you care, and many of my readers do, then I highly recommend trying it for a full day. Commit to a full day and then leave a comment telling us of your experiences.

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

FTP From The Linux Terminal

Why would you want to use FTP from the Linux terminal? It’s quick, easy, consistent, and works well enough as an FTP client. If it’s not already installed, it’s just a quick installation command away. In my experience, it’s usually already there.

If I’m going to be transferring a bunch of files or editing files, I’ll just use a GUI FTP client. My choice FTP client has been Filezilla for quite a long time now. It does the trick and I just keep moving my profile/config to new computers as I get them. Being easy to migrate is a definite selling point for me.

So, what is FTP? It stands for File Transfer Protocol. It’s not encrypted, so many folks have moved to SFTP – which is actually not related to FTP at all. It just shares similar functionality. Even though FTP traffic isn’t secure, it’s still fairly widely used. 

An FTP server is probably not installed by default on your desktop Linux system. However, I’ve written how to Install An FTP Server With VSFTPD which should get you sorted if you need one.

The application will be using is “FTP” which describes itself like:

ftp — Internet file transfer program

And you may find that your version of terminal-based FTP is maintained by your distro maintainers. The FTP command and flagsr should still be pretty universal throughout. Still, be sure to check the man page – especially if things seem weird.

FTP From The Linux Terminal:

Obviously, this requires an open terminal.

Press CTRL + ALT + T and your terminal should pop right open.

Once you have the terminal open the command is basically this:

You can connect via domain name, hostname, or even IP address. It’ll look like this, or pretty close:

ftp from the terminal
See: You can use FTP from the Linux terminal.

There are many commands available, so you should probably check man ftp to see what’s on offer. We’re just going to cover a few of the more useful commands.

You’ll find that ‘ls’ works to list files, just like you’re used to, as does ‘cd’. If you want to change your local directory, that is your working directory on your machine and not the working directory on the server, you need to use the ‘lcd’ command – like so:

Note: Read More About Paths

After you’ve logged in and learned to navigate, it’s time to do something. If you want to download something, you use the ‘get’ command:

That will download the file from the server to the local directory. To do the opposite, that is upload something from your current local directory, you would use the ‘put’ command, like so:

If you want to get or put more than one file, the commands are ‘mget’ and ‘mput’ respectively. They look like this:

Note: It may give a warning about using passive mode. If that’s the case, add the -p flag to your connection command – like ftp -p hostname.

Just like with your regular terminal file management, you can ‘mkdir’, ‘rmdir’, and even use ‘pwd’ to be reminded of your present working directory. Files can also be deleted with the delete <file_name> command.

Closure:

And there you have it, an article that explains how to use FTP from the Linux terminal. It is important to note that the FTP command transmits data without encryption. If security is a concern, use SCP or SFTP.

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

How To: Test Your Bandwidth From The Terminal

There are all sorts of ways that you can test your bandwidth rate from the terminal. This article is going to cover just one of them. As far as articles go, this one should be pretty easy for anyone to follow and understand. It should also be relatively quick.

So, there’s that…

Which is nice…

The tool we’ll be using is known as ‘speedtest-cli’. You may be more familiar with their website, speedtest.net. If you, like most, visit the site, you can have your bandwidth tested in a number of ways and from a variety of servers. You can do that from the terminal, if you want.

Speedtest.org is pretty handy, though I’d probably recommend librespeed.org to folks who are testing via the web. The latter has no Java, websockets, nor Flash. It is also open source. On the other hand, it lacks a way to easily test it in the terminal.

So, what is speedtest-cli? It’s a way to access the speedtest.net tests via the terminal. There are a number of options and I’ll cover the most important of those options below. For now, speedtest-cli defines itself as:

speedtest-cli – Command line interface for testing internet bandwidth using speedtest.net

That’s a pretty accurate description of what it does. It’s also the tool we’ll be using. It’s just easier and fancier than other ways. Sure, you can download a large file in the terminal and get a good idea of what your download rate is, but it’s not much of a test and doesn’t include things like your upload speed.

Test Your Bandwidth:

As stated above, you will test your bandwidth rate in the terminal. To do this, you’ll obviously need an open terminal. To open your terminal with a keyboard shortcut, just press CTRL + ALT + T and your default terminal should open.

Install speedtest-cli:

So, speedtest-cli is unlikely to be installed by default, you’re going to have to install it. If you go to their official download page, you’ll get to download a script form of the application for pretty much every architecture out there. Those will work just fine and have directions about how to use them.

But, you can probably properly install speedtest-cli. For example, if you want to install it on Ubuntu, your installation command would look like this:

I didn’t check every other distro, but it sure looks like it’s available in the default repositories for a bunch of them. Even in Manjaro, I was able to install speedtest-cli with this command:

And all was good with it installing without any need to mess around with scripts or installing it manually. As near as I can tell, it works the same for Fedora and even CentOS. Just use your package manager to do the installation and it’s probably in there.

Test Your Bandwidth With speedtest-cli:

Next, you’re going to want to run speedtest-cli. If you’re familiar with the web interface, the terminal interface won’t seem too terribly foreign. By default, the bandwidth test will be done with the closest servers to you (based on IP address geolocation). You can also pick the server you want it to test your bandwidth with, overriding the default choice.

If you want to run the command that’d give you the results you’d get by using the defaults on the web page, you just run the command without any flags at all. It looks like:

If you want to list servers based on distance from your location, then you first need to run this command:

That will show you servers and their associated server number. Using that number, you can pick which server you want to use with this command:

Those commands will happily give you the test results right there in the terminal, but you can also opt to generate an image. To do that, you use the --share flag. So, a basic command would look like this:

After it spits out the results, it will give you a URL to an image generated based on your individual results. I suppose this is good for bragging rights or for demonstration purposes when complaining about your throughput to your ISP. An image generated from a VPS of mine looks like:

speedtest-cli results from a VPS
That’s obviously from a VPS. My bandwidth isn’t that good! It’d be pretty sweet if it was!

You can use that image to show off to your friends or, as mentioned, a demonstration for how poorly our ISP is serving you. This is one of a few ways you can tell if your provider is actually providing you with the services you purchased.

Those are pretty much the only ways you’re going to use speedtest-cli in the real world. There are a few more options, so be sure to check the man page. As a general rule, most folks are going to just want those options and those results.

Closure: 

And there you have it. You now have a new article. This one is telling you how to test your bandwidth with speedtest-cli, a test you may find useful from time to time.

The bandwidth from my house? Well, I have a lot of stuff using the ‘net on this line right now – but it’s still enough bandwidth for my needs. It’s not nearly as impressive and the results look like this:

speedteest-cli results from my home
As you can see, it’s not that high. That’s actually a bonded DSL line and twice what it used to be!

It’s useful testing to see if you’re actually getting the bandwidth you paid for. Sadly, ISPs are aware of the IP addresses speedtest.net uses and folks tell me that they’re prioritizing traffic from that service (meaning giving you better results than reality would give you) but I have no idea if that’s true or not. To be fair, it does sound sleazy enough for an ISP to do it, though I’ve had pretty good luck with the service providers I currently use.

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

Monitor Network Usage On A Per-Application Basis

Today’s article is going to tell you how to use Nethogs to monitor network usage on a per-application basis. It’s actually easier than one might think and we’ll even show you how to install Nethogs on a variety of distros.

Why would you want to monitor this? Well, you may want to know which applications are eating up most of your bandwidth. Not everyone has unlimited bandwidth after all. You might also be looking for rogue applications/malware that’s using up some of your bandwidth. There are all sorts of reasons to monitor your network usage at this level. Feel free to leave a comment telling us how you intend to use Nethogs.

As stated, we’ll be using Nethogs. The man page describes it as:

nethogs – Net top tool grouping bandwidth per process

I suppose that’s mostly useful to those who know what ‘top‘ is. (There’s a future article about top and htop, when I get to it.) But, Nethogs is like a system monitor, except it’s a network monitor with some visual similarity with top. (Yes, that’s an ugly, ugly sentence.)

We’ll be using ‘sudo’ for all of these commands. It’s possible to use Nethogs without sudo, but we won’t be covering that here. If that’s something you’re interested in doing, a search engine will help you get there.

Monitor Network Usage:

Nethogs is a terminal-based application. As such, you’ll need an open terminal. Just press CTRL + ALT + T and your default terminal emulator should open right up.

Once your terminal is open, you can go ahead and install Nethogs. Pick the command that works with your system’s package manager.

Debian/Ubuntu:

RHEL/CentOS (will need to enable EPEL):

Fedora:

Arch/Derivatives: 

Once you have Nethogs installed, you can check the help files. In this case, the help files are better than the man files (I think) so just enter the following into your terminal:

Now, to run Nethogs, we’ll use sudo and just run it in the terminal. Believe it or not, this mode is generally just fine for anything you’re going to do.

That’ll open Nethogs and start monitoring your network usage on a per-application basis. It looks something like this:

Nethogs running in the terminal.
As you can see, bandwidth monitoring on a per-application basis. Tada!

Now, if you’re going to leave it open, you can change the refresh rate. That’s done with the -d <seconds> flag. If you want it to refresh every 15 seconds, your command would look like this:

By the way, if you want to exit Nethogs, you just press Q and it closes – like top and htop do.

If you want, you can specify the network interface you want to use. It doesn’t require any flags, just the network interface name. (Read Also: how to change your network interface name.) An example of that command would be:

While the application is running, you can do some sorting/display changes with the M, R, and S keys. But it’s usually not all that complicated and sorting isn’t needed. If you’re dealing with hundreds of collections, then you may want to start sorting. Really, that’s about all you’ll ever need.

Closure:

And there you have it! You have another article to read. This one is about monitoring your network usage on a per-application basis, a pretty handy skill/tool to have. It’s pretty easy and the output is clear enough for all but the newest Linux users. If you find the tool useful, or already use the tool, please feel free to comment.

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

Subscribe To Our Newsletter
Get notified when new articles are published! It's free and I won't send you any spam.
Linux Tips
Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.