Change Your Hostname In Linux

This article will tell you how to change your hostname in Linux. It’ll give you a couple of options to use. Both methods are pretty easy, and both are approachable by your Linux newbie. Read on for more information!

If you don’t know what your hostname is, or why you have one, you can take a look at this article. Basically, it’s a handy computer name that you use when you’re using things like SSH or FTP. (The first of those three links would be the best page to learn more about your hostname, but it’s basically just a name for your computer.)

Your hostname is probably something you set during the installation process and seldom thought about again. Unless you’re working with your devices remotely, perhaps with the terminal, it’s not really something that you think about all that often. Well, this article is how about you can change your hostname to something else. 

Why would you want to change it?

Well, you could have duplicated it on another device it by mistake. You may have added more devices and need a new device-naming convention. You may have picked something silly and now want to make it more serious. Your device may be moved to a new network where the name isn’t allowed or already belongs to an existing device. There are any number of reasons why you might want to change your hostname. The key point here being that you can change your hostname.

Onto the article!

Change Your Hostname:

This article, like many, requires an open terminal. You can open the terminal with your keyboard – just press CTRL + ALT + T and your default terminal should open. I’ll start with the easiest of the two ways (that I know) to change your hostname.

Method #1:

The first tool we’ll use to change the hostname is the aptly named ‘hostnamectl’ and to use it, you’d use a command like this:

After that, you’ll need to reboot the system for the changes to take effect. Seeing as you’re already in the terminal, you can actually just reboot the system with this command:

This is the very easy way, and it’s the way I’m going to recommend – even if you’re an advanced user. Alas… There’s another way, albeit a bit more messy, to accomplish this.

Method #2

You can edit ‘/etc/hosts’ and ‘/etc/hostname’, changing the hostname manually. This is also handy if you don’t have hostnamectl as an option. Like above, you’ll need to have a terminal open.

Your first command will be editing the hosts file, and we’ll use ‘nano’ for this. Simply enter the following:

There, you’ll see your hostname (which may also be your username, and often is your username). Just delete that and replace it with your desired new hostname.

When you’re done editing, and seeing as we’re using nano, you can save and exit the editor. Just press CTRL + X, then Y, and then ENTER. (It’s seemingly a little complicated, but not too bad.)

Next, you need to edit the hostname file. The command is similar to the one above, just with a different filename. Enter this:

Find the line that begins with ‘127.0.0.1’ and ends with your current hostname. Erase just the hostname and change it to your desired hostname. To make it more clear, here’s a picture:

change the hostname
Just erase the existing hostname and make it your new hostname. Pretty easy, huh?

Once you’re done with that, just like before, you need to save it. Again, you just press CTRL + X, then Y, and then just hit ENTER. That should save your new hosts file and you’re pretty much done changing your username.

There’s one final step. These changes won’t take effect until after you reboot the system. To change your hostname, you will need to reboot the system after changing these files. That’s usually a painless process and you should be able to use the new hostname after the system is rebooted.

Closure:

Well, it’s another article. If I’m paying enough attention (and if you’re curious about milestones), this marks the 100th article posted on this site. This time, the article tells you how to change your hostname. It’s not something you should have to do often, but these are a couple of ways to change it.

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: Restart TeamViewer From The Terminal

In a previous article, I wrote about TeamViewer, and this article will teach you how to restart TeamViewer from the terminal. The reality is, I like TeamViewer quite a bit but it has a nasty habit of failing during the authentication step.

The only way to make it work, without visiting the device in person, is to restart it. I actually do this with SSH, but it’ll work in the terminal. So, you’re doing it from the terminal – you’re just doing it remotely and using SSH to do that.

Well, no… I have no idea how you’ll be doing it. After all, you might choose to do it locally – where this will also work. So, is it really from the terminal? Yes. It just depends on which terminal, I suppose!

Anyhow, this is just a short article. If you’re physically at the computer, why are you using TeamViewer?!? If you’re physically at the computer, you can just restart it with the GUI – or you can use the terminal. 

Restart TeamViewer From The Terminal:

So, if you’re at the device, just open the terminal. If you’re not at the device and TeamViewer isn’t authenticating, just connect to it with SSH. We’ll assume you’ve already set up SSH and know how to connect. If you don’t, then go back and read the SSH link in the 2nd paragraph. You need to use the following commands. 

To stop the TeamViewer service, run:

To restart the TeamViewer service, run:

If you want to just run one command, you can do that too! Just run:

The latter command is probably the easiest, and TeamViewer fails often enough for me to have taken the time to alias the restart command. As far as I can tell, there’s no rhyme or reason for it to no longer authenticate, but that’s what happens.

Closure:

As I use it often enough, I figure this is worth sharing with the world. It’s not a very long article, but it is indeed an article. Hopefully this helps someone who’s having similar authentication errors. As near as I can tell, just restarting the service fixes it and I’d say that the authentication fails every other day, sometimes more and sometimes less. Thanks for reading!

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.

Better Network Diagnostics With MTR

This article will show you how to get better network diagnostics with MTR, a tool called “My Traceroute” that combines both traceroute and ping into a single tool. MTR is a pretty handy tool that’s likely installed by default and a tool that even regular users should have in their toolbox.

You may remember that I wrote an article about traceroute. If you don’t know what traceroute is, it’d be in your best interest to go read that article, as I will not really be duplicating the work that went into writing that article.

As of yet, I have not yet written an article about ping. Ping is a terminal-based tool, used to time how long it takes for your device to send and receive packets to and from another device. It’ll also tell you if there are packets being dropped along the way. You can use it pretty easily. Here’s a very basic ping command:

(You can use CTRL + C to stop the running process.)

The output from that command is pretty self-explanatory. The numbers you’re probably most interested in are all the way on the right, and denote how long it took for a round-trip message to complete in milliseconds. Online gamers are often interested in their ping times. This is because a higher ping may mean they may lag behind their competitors. In this case, lower is better.

Well, MTR combines the two, traceroute and ping. It’s pretty awesome. You’ll see!

Network Diagnostics With MTR:

So long as you understand both ping and traceroute, there’s not much more this article can teach you. MTR is pretty basic in its output, easily understood by all but the novice users. Anyone with any networking history will immediately grasp the importance of MTR.

MTR isn’t a new tool, having been around since 1997. I won’t be covering how to install it. MTR’s likely already installed. If not, it’ll be easy enough to install it. If anything, this article is largely just an excuse to make people aware of it.

This article requires an open terminal. If you don’t know how to open the terminal, you can do so with your keyboard – just press CTRL + ALT + T and your default terminal should open.

Now, with your terminal open, try:

It should look something like this:

mtr in action
I really don’t need to explain the columns, do I? I’m sure you can figure it out!

There’s some options while it is running. The H, D, R, O, and Q keys all have functions, listed right there after “Keys:”! There are a few options when starting MTR, a whole lot of options. You can find those options by running man mrt. I’ll cover a couple of interesting options here.

If you want to limit the number of pings, you use the -c flag and then add the number. In the example below, I have chosen 5.

You can also just show IP addresses, not resolving the hostname. Like so:

If you want to show both IP addresses and resolved hostnames, the flag is -b.

There’s more that you can do with it, but mostly you can use it to find where along the line the traffic stops. If it’s on your end, you get to do something about it. Otherwise, I suppose you’re at the whim of the MITM. So, give the man pages a look and let me know in a comment if you already use this tool and how you use it.

Closure:

And there’s another article. Woohoo! It’s not just another article, but it’s an article about doing network diagnostics with MTR. It’s not as hard as one might think to come up with ideas for articles. Sometimes, I just use a tool and then realize it may make for a good article. That’s what happened in this case.

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.

Find Your Network Interface Name

There are all sorts of reasons why you might want to know your network interface name. It comes in handy with things like ‘vnstat‘, for example. In fact, I wrote an article about changing the network interface name. (There’s sometimes a reason why I write articles in the order I write ’em!)

Like I said, you may want to know this information for other purposes. In your general day-to-day computing, the network interface name is entirely unimportant. As you’ve seen from previous articles, it may come to pass that you need to know the name and this article will explain how to find that.

Anyhow, this one is quick and easy. I’m just going to show you some easy ways to find your network interface name. This should be pretty brief and simple enough.

Your Network Interface Name:

Like oh so many articles, this too requires an open terminal. Sure, there are GUI methods to find your network interface name, but we might as well do it in the terminal. So, use your keyboard and press CTRL + ALT + T. With your terminal open, you can start with:

With any luck, this should be enough. You’ll get something that looks like this:

network interface name
See the handy arrow? That’ll help! That’s the network interface that’s up and connected.

As you can see by the arrow, that’ll clue you into which connection is in use at the time. If that doesn’t work, you can also try this command:

The output from this will look similar to this:

lshw showing network interface names
A keen eye will note that there are multiple devices listed!

As you can see, that’s from a different device with a different operating system. It also relies on ‘lshw’ which you may or may not have access to.

You can also try:

Some of those commands will show the ‘lo’ connection, which is just a loopback connection and immaterial for this purpose. You can safely ignore that.

Anyhow, those will show you your network interface names. If you have more than one, it’ll happily show them all – and give you a clue as to which one is up. If you have both connected, say wireless and wired, then it will say both are up. This information isn’t very useful by itself, but it is useful for other purposes.

There are other ways, so feel free to leave a comment showing how you find your network interface name.

Closure:

See? I told you this one would be quick and easy. There’s not much to it, but it’s a useful bit of information to know and now you know that this is how you find your network interface name. It’s not much of an article, but it’s yet another in what’s hopefully a long list of ’em! They can’t all be huge pieces!

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.

Dooble Browser: A Review

Today, I’m going to review the Dooble browser, so that you don’t have to. The Dooble browser is a browser that has no dependencies as long as your system has fits ‘latest Qt is supported’ requirement. It bills itself as:

Dooble is the scientific browser.

Many folks are aware that I’m a sucker for a new browser. I install browsers that interest me, even though I have no plans to use them as my regular browser. I install browsers just to see what’s going on in the browser world. Changing my browser isn’t actually something I plan on doing!

So, I first read about Dooble browser when I was browsing Reddit. It was some video that I didn’t watch, ’cause I don’t tend click many video links. Seeing a browser name that I didn’t recognize sent me immediately to a search engine, where I found what was once their home page. That, sadly, wasn’t the project’s page anymore. It sent me here.

Technically, the link I clicked sent me straight to the release page where I found it packaged as a .deb file. Being who I am, I immediately downloaded it – with some glee, as it had been a little while since I played with a new browser. It said it was a scientific browser and I’m a mathematician, so I was pretty sure that the browser and I would get along famously.

I was wrong. Oh, was I wrong.

Installing Dooble Browser:

As mentioned, from the releases page, I found the .deb packaged for my Lubuntu system. It downloaded well enough, but the first thing I noticed was this:

Yes, yes that’s verbatim. I just copied and pasted the output. No, I have no idea why it started off with the selection process like that. I also have no idea why it’d go on to ‘getting’ files. The files were already there. The good news is that it did install and that it was immediately available in the application menu under the Internet heading.

Using Dooble Browser:

So, I opened up Dooble browser and was greeted with what looked like a fairly regular browser. I typed in the address for this site and the site opened, complete with ads.

Curious, I looked for a way to add extensions and found none – more on this later. So, I typed ‘Dooble browser ad block’ into the address bar and pressed the enter button.

Nothing happened.

At this point, I opened a few more sites and decided to open the settings menu. There are like 4 first-level tier buttons that will take you to your browser history… In the settings menu, I found search engines. None of them worked for searching from the address bar. Right clicking on text? Nope… There’s no active ‘search’ feature there.

I found an option to enable ‘web plugins’. This did not enable anything noticable.

I decided to check out the ‘science’ aspect – which is just some sort of mystery graph. To do this, I clicked on ‘Charts’. It helpfully looks like this:

helpful charts from dooble browser
Yes, I pushed the buttons. No, it didn’t help. It wasn’t even remotely helpful.

I have no idea what they’re plotting on the chart. Pressing the buttons didn’t make it clear. I thought about investing some more time, but I don’t like throwing good time after bad.

In my effort to block ads, or at least to see if you could, I played with a feature that let me accept and block domains. I told it to only accept linux-tips.us, and refreshed. It still happily showed me ads from Google. Speaking of which, it’d be pretty sweet if you’d unblock ads on linux-tips.us!

Reviewing Dooble Browser:

Well, it does have an option for a floating clock and floating history. Oh, wait, there’s a 5th way to access history as a top-level option. They sure want you to be able to view your history.

I have no idea why it has ‘search engines’, because there’s no right click search menu and searching from the browser’s address bar does this:

Searching is not Dooble's strong point...
You can just keep clicking and waiting. Nothing happens… You can keep waiting…

Whatever it’s charting, I can’t tell. Usually an X and Y axis actually have labels. Without those, I can’t really tell what is going on. Is it me that’s making the mistakes? Once more, I can’t even tell!

Does it function as a browser? Well… You can technically browse sites. I browsed a number of them before giving up and noticed not one single rendering problem – which is a plus. I was able to login – but my username and password wasn’t remembered, meaning I couldn’t automatically log back in. 

One of the things I noticed was that the ‘cache size’ never increased – regardless of how much browsing was done. On the plus side, I told it to not allow Reddit to send push notifications and it appears to have remembered that.

So, on a scale of 1 to 10, I’m gonna give Dooble browser a solid 3.5. It stayed up and running, with no crashes. It didn’t require any dependencies, and installed cleanly. Technically, it does browse websites. The Gopher support amused me, though I didn’t bother testing it.

I find it laughable in its lack of functionality. That it has search features and then doesn’t let you search is amusing. I just can’t give it less than 3.5. I’m sure tons of hours are going into it, and I’ll assume that it’s going to improve. I’ll keep checking in on it. If you’re a developer and would like to offer some sort of rebuttal, I’m all ears. 

Closure:

Well… That’s a review. I don’t think I can recommend the Dooble browser to anyone at this time. They have lofty goals but are failing to meet them. When it becomes a usable browser, I’ll try to let people know. I’ll check in on it from time to time, even if just to get a chuckle from how laughably bad it is.

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.