More Ways To Generate Strong Passwords In Linux

In today’s article, we’re going to explore a couple of other ways to generate strong passwords in Linux. It’s going to be a pretty easy task and one most everyone can learn from. It shouldn’t even be a very long article.

Weak passwords are easy to crack. You don’t want that, for obvious reasons. If you want to see how approximately how long it’ll take to brute force passwords, you can check sites like this one. Remember that the time given by that is more or less the maximum time it could take, and your password could be brute-forced (by repeated guessing) much sooner than that.

I’ve previously written an article about generating a sufficiently complex password. That’d be one way to generate strong passwords, but this article will cover a couple of other easy ways to generate strong passwords in the Linux terminal.

Generate Strong Passwords:

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.

With your password open, we’re first going to use GPG to create a strong password. Everyone should already have GPG installed, so there’s no reason to cover that in this article. So, to do so, you’d use a command something like this:

It’ll have an output similar to this one:

using gpg to generate a strong password
Obviously, you don’t want to use that password specifically! Use your own!

You can change the 16 to any length you want. It’s obviously the number of characters. 

You can also use OpenSSL, which you likely have installed, to generate a complex password. It’s actually pretty easy and the command is:

Again, you can change the 24 to anything  you darned well please. Sometimes sites will have a maximum password length, which might seem kinda silly – as I think I recall there being a hard limit of 256 characters that the kernel will accept. Either way, the output would be similar to this one:

openssl can generate passwords too
That one is 24 characters long. Yay!

Feel free to mess around with changing the length. OpenSSL is likely installed by default and you don’t have to install pwgen. Both of the tools in this article will likely be installed by default.

Closure:

And there you have it! Another article said and done. This one is about teaching folks how to generate strong passwords in Linux. It’s an easy enough task and this article shouldn’t be too complicated for even the most n00b of the n00bs!

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.

 

Unzip A .zip File In the Linux Terminal

Today’s article is going to tell you how to unzip a .zip file in the Linux terminal. It shouldn’t be too complex, nor will it take a great deal of time to learn how to unzip a file.

In the Linux world, we don’t really see the .zip files all that often. We have other ways to compress files, but .zip is still there and you’ll sometimes come across them in your travels.

If you’re unaware, the .zip form of data-compression is actually a ratified standard. The format has been around since the late 80s and is one of the compression methods that supports loss-less compression. There are all sorts of compression formats and methods, but .zip has been around since forever and will probably exist long into the future.

If you want to unzip a .zip in a GUI, I’d say that you need look no further than PeaZip. It’s easy enough to compile from source, or you can find pre-built PeaZip packages for most distros. This article, on the other hand, is how to unzip a zip in the Linux terminal.

It’s not all that daunting and should be a pretty easy article for even a beginner to follow. Though, I suppose, any well-written article should be easy enough for a beginner to follow. Were I something other than a basic keyboard smasher, I’d probably be able to do that!

Read: Decompress a .tar.gz in the terminal

Unzip A .zip:

The headline clearly mentions doing this in the terminal, so you’re going to need an open terminal to continue. That’s relatively simple. Just press CTRL + ALT + T and your default terminal should open.

With your now-open terminal, let’s first make sure you have the ability to unzip a .zip file. To do that, let’s use:

That should return something akin to:

If you do not get a result, you’ll need to install unzip from your system’s repositories. Trust me, it’s in there – unless you’re using a really, really basic distro.

Assuming you get results indicating that you have unzip, it’s actually easy to unzip a .zip in the Linux terminal. You just navigate to the correct directory and run:

Which, I suppose, is mostly all you’re going to need. I should also mention that when you’re attempting to run this command, you can generally type the first few letters of the file name, and then press TAB to auto-complete the file name, saving you some typing time and just generally making the whole thing easier.

Obviously, there’s more to the unzip command. You can check the man unzip page, but the more useful flags will get covered here. Seriously, check the man page. The command is absurdly complex, with tons of options for obscure uses.

For example, to unzip a .zip to a different directory, you just use the -d flag, like so:

If you need to enter the password, you can just use:

When you want to list the files without decompressing them, you just use the -l flag, like this:

If you want to test the ,zip file to see if it’s corrupted, you can use the -t flag.

Normally, it’ll extract the files and overwrite the existing files (if any). You can avoid that with -n flag:

When you unzip a .zip, you will find out that it happily creates new directories. You can avoid that with the -j flag, like this:

Do read the man page! There’s a zillion options.

Closure:

Seriously, read the man page. Learn how to unzip a .zip file – and then all the many, many options included. Of all the man pages out there, this one is one of the most complex ’cause this one little application has a ton of options. Even if you don’t intend to learn it all, read the man page!

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.

Kill Frozen Applications The Easy Way

Linux is an operating system and, like every operating system, you sometimes need to kill frozen applications. Computers are not now, nor will they ever be, perfect devices with perfect software. Sometimes, crap happens and you find yourself in a situation where you need to kill a frozen application or two. (Even if it were perfect, your RAM is bombarded with EMR and will eventually knock a bit loose, even with ECC RAM.)

There are all sorts of ways to deal with frozen applications. You can do everything from sigterm to pkill. Worst case scenario, you always have RIESUB to fall back on – for a completely frozen system. All of those are great and have their place, as does this method.

As this is meant to be quick and simple, so we’re just going to jump into it – and have a relatively brief article today.,,

Kill Frozen Applications:

Let’s say you’ve somehow managed to make your browser freeze. It is unresponsive, though the rest of the system seems to work just fine. You could open a terminal and try the pkill and sigterm types of resolutions or you can use xkill. It’s literally point and click!

So, open your terminal and enter the following (read the rest before doing this):

When you do, your terminal will look a little like this:

xkill in action
The icon will change as well, but I can’t seem to capture that.

Your cursor might also change. In one test my cursor is an X and on another test, with a different OS, it’s a red skull and crossbones. I couldn’t caputer either in a screenshot, so you get what you get.

NOTE: If you change your mind and don’t want to click-to-close, you can still type in the terminal. You can use sudo pkill <terminal-name> to get back to normal.

Anyhow, take that cursor and click on the application you want to close. This sends a shutdown command to the frozen process and things should go back to normal after the frozen application closes. Of course, sending the shutdown command to a process in no way indicates a certainty of it listening, it may still fail and stay frozen – perhaps depending on how exactly frozen the application is.

NOTE: It has come to my attention that I should warn you. If you click on it after typing xkill, it WILL close it. It’s pretty indiscriminate. It doesn’t care if you’ve saved. It will kill it. I’m also told that CTRL + ALT + ESC is a shortcut in Mint for this, but I can’t seem to make it work. 

Closure:

See? I told you that it’d be a quick and easy article. This one is about you you can kill frozen applications – but there are all sorts of ways to do that. You can expect future articles to cover this very subject, but with different methods. I just figured this would be quick and easy for everyone.

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.

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.