Who is, Simply whois

Today, we’re going to learn about whois. There’s not much to it, so it won’t be a very long article. Think of this article as some of the others, where it’s not so much about the tool (the tool is simple to use) it’s about making folks aware of the tool and the capability.

Have you ever wondered about a domain name? Maybe you want to see if it’s registered? Perhaps you want to see who has registered it? Maybe you’ve noticed they have great uptime and want to see the name servers so that you can deduce the hosting company? Perhaps you want to file an abuse report, or you just want to know who the owner is so that you can send them an email. Maybe you’re a stalker and just need to narrow it down a little! (I kid, please don’t stalk anyone.)

Well, you can do that and more with whois! Want to know when the domain name expires so that you can swoop in and steal it? Well, you might be able to do that with help from the handy whois command! You can at least see the expiration date. I tend to keep things registered well in advance, ’cause I’m forgetful and don’t want to lose a domain name.

Unfortunately, quite a bit of information in whois databases is intentionally wrong. Sometimes, the information is quite useless. Certain domains, like this one, have requirements – so I have to use my real name in the registration information (though they never actually check). Other domain names aren’t so particular and you can lie, use email forwarders for abuse complaints and contact info, and generally hide that sort of stuff from whois databases. Ah well…

So, who is whois?

whois:

You might just as well crack open a terminal. If you don’t know how to open the terminal, you can do so with your keyboard – just press CTRL + ALT + T and something useful should happen.

With your terminal open, go ahead and install whois. It’s surely in your default repositories, so just install it like you’d install any other software. As is the tradition, I’ll show you how to do it in Ubuntu or any apt-using distro:

Now, all you need to know is:

You don’t need the http, nor the www, just use the domain name. For example, you can:

I should point out that that’s not really my phone number. You probably shouldn’t call it. If you somehow need my phone number, just ask in private and I’ll share it with you – assuming there’s justification for doing so. Also, please don’t stalk me.

Anyhow, you can see when the domain expires, tell that I use a CDN and which one I use, see when the domain was registered, find out who the registrar is, etc… You can learn quite a bit of information from just that one command. Combined with something like traceroute and you can learn a lot.

Closure:

Anyhow, now you know about ‘whois’ and a bit about what you can do with it. If you want to go digging around, you can learn quite a bit – even if the domain’s behind a privacy fence. There are other tools, like MTR and dig (which we haven’t covered).

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.

Let’s Disable Your Webcam

In today’s article, we’re going to show you how to disable your webcam. It’s something I’ve seen folks ask before, and something someone contacted me to ask about. While I don’t normally answer questions via email, it did seem like a good article to write.

I see this question, about how to disable your webcam, quite a lot. There are some ingenious solutions, from sliders you can stick to your laptop to just putting a piece of electrical tape over it. Some vendors have gotten in on it and include a sliding cover that you can use when the webcam is not in use.

If you’re that paranoid, you might want to look for a laptop (generally) that doesn’t have a webcam – but that can be hard to find these days. In some cases, they’ll have a red light that comes on when the webcam is in use. Of course, the truly paranoid don’t trust that. And the really, truly paranoid people know their coffee pot is spying on them!

Well, in today’s article we’re going to share how to disable your webcam. It won’t be all that difficult. It’s something a beginner could do, if they can follow directions, because we’ll be using nano. So, anyone can do this…

NOTE: I only tested this with Lubuntu. That means it should work with any Ubuntu flavor and with any derivatives of Ubuntu. It should also work up-stream and in most distros, but I can’t say that those have been tested.

Disable Your Webcam:

Like many articles, this one 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.

Once you have the terminal open, enter the following command:

Now, copy/paste (or type yourself) the following into that file:

The first line, the line starting with a # sign, is a ‘comment’, meaning that it’s there for you, the reader, and won’t be interpreted by the computer as an input or a command of any kind. This is pretty common and traditional. You can change that text to anything you’d like. Something short and descriptive is probably best.

Now, you’ve gotta save it. It’s nano, so it’s actually not that hard but might confuse some folks. After all, it could seem hard if you’ve never done it before, but this is how you save it with nano. You just press CTRL + X, then Y, and then ENTER Bob’s your uncle! It’ll save the file and close nano for you.

Finally, you need to reboot for the changes to take effect. The effect is permanent, more or less. If you want to undo it permanently, then just reverse the process from above. If you want to disable it temporarily, you can try this and it should work for you:

That should do it! Though you’d still have a non-working webcam the next time you rebooted your computer. If you’re going to take the time to disable your webcam, you probably want that behavior anyhow. Again, if you disable your webcam and want to truly reverse it, just remove the lines like I mentioned.

Closure:

I don’t really want to encourage people, but I won’t be terribly rude if you email me with a question. Just, you know, know that I have other things going on in my life and that I don’t actually have all the answers. I write about the things I know, the things in my notes, or the things that spring to mind when I am late with scheduling another article. Ah well, now you know how to disable your webcam.

On the other hand, you can feel free to email me questions you think I might be able to answer (Keep ’em simple!) that might make good articles. I could use your question as a bit of an intro fluffing device and then do a “Reader’s Questions” kinda thing. There’s a big difference between emailing me for support and emailing me with a question that might make a good article. There’s no pressure in the latter case, as there is no time constraints or expectations. So, feel free to do that – just don’t expect me to respond with a solution, and there might be an article that comes from 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: Search With apt

Today we’ll learn how to search with apt. There are any number of reasons why you’d want to do this. You can use this to find applications by name or subject. Maybe you want to find files that meet a certain criteria? It could be that you’ve forgotten the name of the application you’re thinking of? Perhaps you want to know if an application is available in the repositories before you go seeking it elsewhere?

There are all sorts of reasons, including those, why you might want to search with apt. Obviously, this requires an operating system that uses apt, so that limits you to things like Debian, Ubuntu, official Ubuntu flavors, Linux Mint, etc… So, well, it’s a pretty sizable number of distros where this will work.

This will be a pretty simple article. It will also be pretty brief. I’ve likely mentioned searching in another apt article, but it’s important that we cover it. Alas, I’m running out of things that make for longer articles (in the notes I’m working from), so this is just another article where I’m trying to make you aware that certain tools exist.

This should absolutely be a short and easy to understand article. In some recent commentary, I realized that what’s ‘simple’ to me is something that someone else has been dealing with for the past year. Even my easier articles have the chance to help people figure out their Linux problems. Good… It makes me feel better when I write an ‘easy’ article.

So, with all that said… Let’s learn how to:

Search With apt:

This article pretty much requires an open terminal, like oh so many other articles on this site. If you don’t know how to open the terminal, and you should by now – if you’ve been following along long enough, you can do so with your keyboard – just press CTRL + ALT + T and your default terminal should open.

Now, it should go without saying, apt is how you interact with your package manager. It’s how you install, uninstall, or otherwise manage your software in the terminal. You could insist on using a GUI to install software, in which case this won’t be of much interest to you, or you could just do it all in the terminal. Either way, if you are using a different package manager then this will be of no value to you.

Me? I prefer to do this sort of stuff in the terminal because I find it easier and faster. I’ve already got a terminal open anyhow, so I might as well use it.

Anyhow, with your terminal open, go ahead and type:

For example:

Seriously, if you’ve never used the search function, go ahead and try the above command. You might be surprised by what you find.

Now, if you’re trying to narrow it down some, you can use the –names-only flag. Which isn’t as accurate as it could be. For example, try:

But, as near as I can tell, that’s searching not just the names but also searching the one-liner description. Like, if you run the above command you’ll also see ‘terminator’, which is definitely not ‘terminal’.

However ‘terminator’ includes ‘terminal’ in the description. So, I’m not sure where that’s going with that and the man pages weren’t all that helpful. You can also use RegEx (Regular Expressions, for the uninitiated). For example,  you can run:

This, of course, only works if you have Google’s Chrome repositories enabled. Otherwise, pick something else to test this with. Or, just trust me when I say RegEx works, which the man page will confirm.

Anyhow, our example command from above would (on this computer) would have an output that looks like this:

Which, as you can see, means I have multiple versions of Chrome available. So, that’s something positive in my life! But, the point is, I did a search with apt and came away with the information I wanted. I’d normally send you to the application’s man page, but in that probably won’t make it all that much clearer. 

Closure:

Yeah, that’s it. You can now search with apt and find what you’re looking for. Use some of your own search terms, like apt-cache search image editor, and see what sorta results you get. It’s not the most refined, but it’s an effective way to search with apt.

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.

Let’s Talk About Using dos2unix

Today, we’re going to talk about using dos2unix, a tool for converting Windows text files to Unix (Linux) formatted text files. The command isn’t very difficult to use, so this article is more about making you aware of the existence and purpose of said dos2unix. It should be a remarkably short article.

First, we have to go back in time…

Once upon a time, when you reached the end of the line with text, you had to instruct the hardware to start a new line. These were the old days of things like teletype machines and dumb terminals. They needed to be told when to begin a new line.

Well, that still exists in software today. The thing is, if a file was created on Windows it will have two characters denoting when a new line should begin while a file created on Linux will only have one character indicating when a new line should begin. Yay for compatibility issues!

Anyhow… This is why you will sometimes get errors with text files. For example, writing a shell script on Windows and then trying to use it on Linux may result in end of line errors. Windows uses CR (Carriage Return) and LF (Line Feed, you may know it as /n) while Linux (and Unix) just uses LF. This, of course, can cause some confusion for the operating system.

This is where dos2unix comes into play. This is why you’re getting an article about using dos2unix… So, with that in mind…

Using dos2unix:

This article requires an open terminal, like oh so many other articles. If you don’t know how to open the terminal, just press CTRL + ALT + T and your default terminal should open. Tada!

Now, you’ll need to install dos2unix. It probably isn’t installed by default. Just use your package manager’s standard install command and I’m like 99% certain it’s a package available to you by default. For example, in Debian, Ubuntu, and Ubuntu derivatives and flavors, it’s just a simple apt command:

Once you have dos2unix installed, you can convert Windows-created text files to Unix (and thus Linux) formatted text files by fixing the way they end a line and start a new line. That’s really easy. It’s just:

Yup…

Well, I suppose you could also do /path/to/filename.txt if you needed, or you can just navigate to the directory and use the command above. It really is that easy.

There’s more to the dos2unix application, but that’s about all you’re really going to need to know under normal circumstances. It really is that simple. Do check the man page (man dos2unix) for other options, but you’ll see that’s about all you’re gonna need.

Closure:

Like I said, this article is really about making you aware of the problem and solution, so that you can start using dos2unix if and when you need it. It turns out that dos2unix is more than just a contributing forum member on Linux.org, it’s actually a useful application for dealing with Windows files on a Linux box!

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.

Let’s Root Around In The /proc Directory

Today, we’re going to root around in the /proc directory. Why? So we can learn about our Linux system. See, there’s quite a bit of information hidden in there and I’m going to show you how to get it out of there. You’ll have to root around for it, as I’m not going to document every possible combination, but you’ll have the tools to do so.

We will be using the terminal for this, but we’ll only be using a couple of tools. The first tool we’ll use is the ‘ls’ command. We’ve used it before to sort files by time and sort files by size and even to show hidden files and folders. So, as you can guess, it’s a pretty handy command.

The other application we’ll be using is ‘cat’. We’ve used that less often, but we’ve used it before, but here’s a brief overview of the ‘cat’ command. You might want to read that. But, basically, we use the cat command to read files in the terminal. 

The ‘cat’ command is also a pretty handy command. You can try it out yourself. If we assume you’re using bash and have history enabled (the vast majority of Linux users) you can do something like:

That command should spit out the history of commands you’ve typed into the terminal. Perhaps some of ’em will have been things you learned right here on Linux-Tips! Well, maybe… I mean, people tell me they learn stuff here, though I’m never quite sure how! 😉 Anyhow…

So, this will be a fairly informal article. It should also be quick and easy. You’re welcome!

Rooting Around In The /proc Directory:

This article requires an open terminal, like many other articles on this site. 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.

Like I said, this is a fairly informal article. Quick and easy, right? Well, I’m going to show you everything you need to know in one command. Ready?

You’ll see a whole lot of files. What you want to do is use ‘cat’ on those files. Like, if you want to read/check your CPU information, you’d use:

Do you want to see the information the system has for your memory?

Not all the files have useful data, but some of them do. That’s why you’ve gotta root around in there. You’ve gotta learn which files contain which information – but I’ve given you a head start with two of them. You’re on a path of discovery, ’cause I’m surely not going to go through all of ’em to tell you what they do. I give you the tools, you do the work. Or something like that…

Closure:

See? Nice and easy, and very much an informal article. You can now root around in the /proc directory to get some system information. You may need elevated permissions to read some files, and some of them contain what’s pure gibberish to me. They might make more sense to you!

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.