Find Your Graphics Card Information

Today’s article isn’t all that spectacular, but it is useful, as we’re going to discuss a few ways to find your graphics card information. That’s handy stuff to know, especially if you are new to the computer or are looking to do things like find drivers for said graphics card. This should be remarkably quick and easy, actually.

We will be using tools we’ve used before. These are simple tools, tools used to learn hardware information. Well, they can all be narrowed down to show just the graphics card information. They can also give information about other hardware, not just graphics card information.

All the tools we’ll be using should be installed by default. We will use one program that isn’t necessarily installed by default. That program will be inxi. You can learn how to install inxi easily enough, and the rest should be installed by default. If inxi is not installed, install it.

Like I said, the article should be fairly quick and easy. You only need a few specific commands. ‘Snot all that complicated, now is it? 

So, let’s take a minute to read an article that tells you how to learn more about your…

Graphics Card Information:

As is often the case, 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.

With your terminal open, let’s go ahead and use the inxi command first:

See? Plenty of graphics card information.

How about we use ‘lshw’, a tool for listing hardware information? Well, the command for that would be pretty easy. You just need to specify that you want graphics card information. It looks like:

Finally, we can use ‘grep’ and ‘lspci’. We’ll also use the -k flag to list kernel drivers. It’s easy. You don’t have to memorize it, you can just refer back here later when you actually have a need for your graphics card information. It looks like:

That should do it. You can use any of those three methods (or more) to find your graphics card info. I just use on-board graphics, so a screenshot would be quite boring.

Closure:

Well, there you have it. You have yet another article. I didn’t go deep into the usage of each tool because there’s no reason to. Each program has a help file associated with it. Consult the help file if you wish to know more. This article’s goal was to demonstrate a specific 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.

How To: Reload Your .bash_profile

Today’s article is going to explain  how to reload your .bash_profile. It will be just a quick and easy article, one that won’t take up much of your time. It’s not all that complicated, but it’s something folks probably should know.

So, most of you will probably have a .bash_profile. There are other shells, but Bash is the most common. That’s where they store various bash settings. When you make changes to the .bash_profile, the profile needs to be reloaded for the changes to take effect.

I’ve probably covered this elsewhere, though I did write an article to show you how to find out which shell you’re using. If you don’t know, Bash is the name of the shell and stands for Bourne shell. There are many shells, but Bash was the first one ported to Linux. Indeed, it was one of the first applications ported to Linux. It’s still widely used as the default on most distros.

There are times when you’ll want to edit your .bash_profile for additional functionality. It’s where you’d go to change things like terminal output colors and you could even add aliases to the file if you really felt like it. (Those should probably bo in .bash_aliases, for the record.)

With that in mind, I’ll show you how to reload your .bash_profile.

Reload Your .bash_profile:

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 won’t be a very long article. It’s not terribly complicated.

Let’s say you’ve made a change to your .bash_profile and you want it to take effect immediately. To do that, you enter one of the following two commands:

Alternatively:

You could also close all instances of the terminal and the new .bash_profile changes should take effect the next time you open the terminal. If you really want to have another way, you can reboot and the changes will take effect the next time you open the terminal as that too will reload your .bash_profile.

Closure:

See? I told you this would be a quick and easy article. It’s not all that complicated. You probably don’t need to reload your .bash_profile often, but now you know how to do so when you need to do so. Yup, it’s also another article. There are now more than 250 articles, by the way. Who knew that it’d turn into this?!?

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.

Remove A Swap File

In today’s article, we’re going to learn how to remove a swap file. This isn’t something I recommend, for reasons I’ll explain, but I have no ethical qualms about telling you how to do so. After all, it’s your computer. You get to decide what it does!

There are some folks who will tell you that if you have enough RAM you don’t need swap. Well, I am not one of those people. I tend to have swap enabled regardless of how much RAM I have. I have a good reason and I’ll explain it to you as best as I can. I mean, the actual inner workings of the kernel are above my head, but I’ll explain it – or let other people explain it.

See, contrary to popular opinion, swap isn’t just a place the kernel sticks stuff when you’re running low on RAM. For example, check out the picture below:

swap in use with plenty of free RAM
As you can see, swap is used even with plenty of free RAM.

Here’s more information about the free command.

Now, do me a favor and go Google Linux and swap. You’ll find plenty of pages that briefly have this to say (and barely this to say):

Swap space in Linux is used when the amount of physical memory (RAM) is full. If the system needs more memory resources and the RAM is full …

                                                                                                        That’s from MIT!

That’s only about half the story… There’s more to it, and that is kinda important.

Some More About Swap:

So, is it really that simple? Of course it isn’t! If it was really that simple, the intro to this would have been so much easier to write. No, it’s slightly more, a bit more, complicated than that. See, let’s quote a more thorough (and accurate) Linux.com:

Swapping is necessary for two important reasons. First, when the system requires more memory than is physically available, the kernel swaps out less used pages and gives memory to the current application (process) that needs the memory immediately. Second, a significant number of the pages used by an application during its startup phase may only be used for initialization and then never used again. The system can swap out those pages and free the memory for other applications or even for the disk cache.

                                                                                                     –Emphasis Mine.

What can we take from that? Well, it’s not just a place where the kernel stuffs things when there’s no RAM left – it’s also a place the kernel sticks things to avoid wasting RAM. This is very different than swap is just a place where the kernel stuffs things when RAM is low. It avoids using some RAM that’s best used elsewhere. That seems kinda valuable and important to me. Again, the inner workings of the kernel are pretty much witchcraft to me, but swap seems like a good thing to me.

The kernel is pretty smart about this, from what I’ve observed. It’s good at its job. It’s better at its job than you are. It is better at its job than I am. I highly encourage you to use swap, saving your RAM for more useful things. With disk space as large as it is, you’re not going to miss a couple of gigabytes. Let the kernel do its job, managing RAM as best as it can. They’ve put thousands of hours into making the kernel smartly deal with RAM, there’s no reason to hobble it.

Of course, ain’t nobody gonna listen to me… So, with that said, I might just as well go ahead and tell you how to remove a swap file… You’re gonna do what you want anyhow!

Remove A Swap File:

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.

The first thing we’re going to do is verify that you actually have a swap file…

If that mentions a swap file, only calling it a ‘swapfile’ (a single word), then your next step is to turn your swap off.

Now, for your next step you will want to remove the swap information from fstab, so let’s go like this to do that:

Find the line that starts with /swapfile and delete the entire line. All of it. Leave nothing behind. If you screw this up, your next boot may be an interesting exercise. The line is probably longer than it looks unless you’re using a terminal in full screen! Be sure to remove all of it. It should end with a 0, actually a 0 and then a tab and another 0.

Be doubly sure to remove the full line and then save your work. Then save it with nano. To do that, just press CTRL + X, then Y, and then ENTER. That’ll save it.

Finally, remove the swap file itself. That one is nice and easy, you just:

That should do it! If you’ve realized you’ve made a mistake and want to have a swap file, you can always add a swap file. (I’m pretty sure it should be ‘swapfile’, but the rest of the ‘net calls it ‘swap file’, so I’m going with the majority – even though the majority don’t even know what the damned thing does!)

Closure:

There you have it. You now know how to remove a swap file. If that’s what you want to do, you go right ahead and do it. Truth be told, assuming you’ve got enough RAM, it won’t necessarily break anything. You might not even notice it is gone. Still, I figure it’s better safe than sorry – and who am I to judge what the kernel wants?

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.

A Couple of Ways To Resize Images With ImageMagick

In today’s article, we’re going to go over a couple of ways to resize images with ImageMagick. It’s a useful skill to have if you’re into sharing images or the likes. This will actually be pretty quick and easy. I won’t take much of your time today but it’ll be longer than some other articles – but it really should be a quick read for you today.

It’s nice to not put full resolution pictures online – unless there’s a reason for the higher resolution. So, it’s a bit of a politeness to resize your images. I try to be considerate, ’cause I know what it’s like to have limited bandwidth. You people who started off in life with things like 100 GB fiber have no idea the pain we went through to get here! Alas, that whining is perhaps subject to another article, though probably not really a suitable article for this site. There are people who still use slow connections, and metered connections are entirely too popular.

So, what is ImageMagick? It describes itself as:

ImageMagick – is a free software suite for the creation, modification
and display of bitmap images.

ImageMagick is actually quite a useful application for quickly and easily manipulating images in the terminal. ImageMagick is so robust that trying to cover all of it in a single article would be foolish. I simply couldn’t do it within the bounds of a single article.

That’s why we’ll just be examining a couple of quick ways to resize images with ImageMagick. We couldn’t possibly cover it all today. If you want to see what all the options are, I’d recommend checking the man pages – and reading other tutorials that cover the things you’d like to do.

With that said and done, let’s resize some images with ImageMagick!

Resize Images With ImageMagick:

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.

The first thing we’re going to need to do is make sure you have ImageMagick installed. So, let’s install it. The command below is for those who use apt, but you can easily change it to your own package manager. I’m 99% certain that ImageMagick will be in your default repositories! It’s a pretty widely used application! The command for those of us who are apt-using people is simply:

Follow any on-screen prompts to install it, else it’ll tell you that it is already installed. ImageMagick appears to be installed by default on a number of distros, but it’s easy enough to install. You can actually just add a -y to it and skip some of the prompts:

Of course, you’ll still need to enter your password. Well, if you really want to live on the edge, you can enable passwordless sudo easily enough. I don’t really suggest that, but I do tell you how to do it. ‘Snot something for the faint of  heart.

Ah well… Onto the meat of the article!

Resize By Resolution:

Now that you have ImageMagick installed, let’s try resizing something. What we’re going to do first is resize it by way of the resolution. That is, we will resize it by declaring the new height and length. To do so, you’d use a command like:

For example, you might try something like this:

See? Pretty easy. I told you this wouldn’t be too hard – nor will this article be all that long. Well, it might be a bit longer than some, but I won’t let it be too long. I know my reader’s attention span! You should make sure to use the same base resolution. If the image is 16:9, your resized image should retain that aspect ratio. Otherwise, your images may appear warped and ugly.

I should probably mention that it’s possible to make images larger with this command. However, when you make an image larger you lose fidelity. Making an image too large is going to result in an ugly image. It’s not like the television where you can just keep zooming in and enhancing. Ones and zeros don’t work like that.

Resize By Percentage:

This is my favorite way to resize images with ImageMagick, unless I have a specific reason to resize images by resolution. In this case, you just declare a percentage of the original and ImageMagick does the rest. It’s really a very easy command. It looks a little like this:

If you want, here’s an example of how you can use that command to resize images by percentage with ImageMagick:

That command will make ImageMagick output a file that’s 50% smaller than the original image. Not only will this be a smaller image visually, it will have a smaller file size. Because of the way images work, this doesn’t mean the new file size, size on disk, will be reduced by 50%. It just means you’ve reduced the image’s dimensions by 50%. The size on disk will also be lower, but it’s not directly proportionate. 

Like above, where  you resize the image by resolution, you can use this to make images larger. The same caveats exist that existed above. That is making an image too large means it results in a poor quality image. As you can guess, making images larger isn’t always a good idea, but it’s generally fine if the operation is making the images smaller.

Closure:

And there you have it. You have another article! This time, we’ve covered how to resize images with ImageMagick. I think that’s a useful skill to have and it’s a quick/easy thing to learn. Of course, you can always check man imagemagick to check the man page. That man page will be enlightening, I suspect.

I’ve changed the format a bit for this article (though I’ve used it before), and made it a bit longer than the recent articles. If you have an opinion on the matter, please feel free to leave a comment. The more I know about your wants, the more I can tailor the content. The more I can tailor the content, the better you’ll enjoy the content. To do this, I need to know your thoughts on the matter. Speak up!

So, do you enjoy the longer articles? Do you enjoy the shorter articles? Do you appreciate a mix of them, and each article only being as long as it really needs to be? I normally try to keep all my articles friendly, informative,  and fairly strictly informal. Lately they’ve been pretty  short, but I can be more verbose, as many of you will have witnessed.

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 Install Microsoft Edge

Today, we’re going to learn how to install Microsoft Edge. That’s the browser made by Microsoft that even has a Linux version. That’s right, it’s from Microsoft but has a Linux version – and a version packaged for pretty much everyone.

We’ll be installing on Linux Mint, just to mix things up a bit. It’s really not that much of a change, it’s still using apt. It just so happens that I’m sitting at a Linux Mint computer when I’m writing this. We might as well use GDebi while we’re at it.

Yes, I’m well aware that many of you hate Microsoft with a passion. That’s fine. If you don’t want to install Microsoft Edge, just move on and don’t bother those of us who are curious about the browser. You’ll have another article in a couple of days, and it quite likely won’t have anything to do with Microsoft.

If you don’t know, Microsoft Edge is based on Chromium – which is the opensource version of Chrome, more or less. Chromium doesn’t have feature parity with Chrome, so it’s not quite the same version. Chrome is mostly based on it.

There are many browsers based on Chromium. Brave, Vivaldi, Opera, etc.? They’re all based on Chromium. There are only so many browser engines out there, and Chromium being opensource means people are going to use it. Microsoft jumped on the bandwagon with their Edge and made it available for Linux users. So, we’re going to…

Install Microsoft Edge:

This article requires an open terminal, but only for a minute. 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.

To keep things easy, we’re going to install GDebi. As we’re doing this on Mint, the command will work with any apt-using distro, the command to install GDebi is:

Follow any prompts to ensure you install GDebi properly.

Next, fire up your favorite browser and:

Click to download Microsoft Edge for Linux (make sure to get the right one for your distro). There are a number of choices, so pick the right version of Microsoft Edge for you.

Let it download, say to your Downloads directory. When your download is complete, right click on it and choose to open it with GDebi directly from the right click menu.

That part is easy, just let it do its preliminary checks and then  you can click on the install button (upper right) when it’s ready to be installed. Later, if you don’t like it, you can open the .deb with GDebi again and opt to uninstall the package. See? It’s pretty handy.

Closure:

I actually wrote a review of Edge before, but it’s on the old site and not really very good. Even if you can’t stand Microsoft, it’s not a bad browser. It’s not one that I’m going to use in my day-to-day browsing, largely due to lethargy, but it’s still a viable browser.

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.

Linux Tips
Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.