Short: Fix Typos With A Caret

Today’s article is labeled ‘short’ for a reason, and that reason is that we’re just going to cover how you fix typos with a caret. If you’ve ever made typos in a terminal command, you might be interested in fixing typos with a caret. 

This is labeled ‘Short’ for a reason. I’m trying something new. It will be an intentionally brief article. If there’s any benefit to this, I’ll do more short articles in the future.

If you don’t know, the ^ character is a caret.

If you don’t know, you can fix typos with a caret. It’s not difficult and every single one of us has made typographical errors in a terminal command. That means each and every one of us can benefit from fixing typos with the caret character.

You might also be interested in:

Fix Terminal Command Mistakes

It’s really simple to fix typos with a caret. You’ll see…

Fix Typos With A caret:

This article requires an open terminal. Just press CTRL + ALT + T to open your default terminal emulator.

The syntax is as follows:

That doesn’t make much sense, I’m sure. Let me show you an example. We’ll use the ‘uptime’ command.

Let’s say you made a typo and instead of ‘uptime’ you entered:

This will, of course, throw an error. 

You can use the caret character to fix this. For example:

The output from those commands would look like this:

As you can see, you’re replacing uplime with uptime and using the caret character to do so. This is pretty simple and a great way to save typing time when you make a typo in the terminal – especially if it’s a long command.

It doesn’t need to be the first word or anything like that. Let’s make an example out of the following command:

This is, of course, going to throw an error. So, enter the following:

That will re-run the previous command but will substitute the changed text for the matching text in the erroneous command. It doesn’t matter where the typo is in the previous command. It can be anywhere within the command and doesn’t need to be the first word or anything like that.

Closure:

So, this is a short article. Indeed, it’s called a ‘short’ in the title. If it does well, we may see more of them. If it doesn’t do well, you can expect them to disappear without much of a wrinkle in time. They may catch on. I don’t know. I don’t dare speculate, so your opinions really matter in this case.

I do welcome your opinions on the matter. I also don’t mind typing short articles now and then. As far as I can tell, writing an article takes me about the same amount of time, regardless. So, do let me know your thoughts on the matter. Without you, the reader, this site is pretty pointless. Thus, your thoughts on the matter are of interest to me.

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 site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

Automate Updates In Linux Mint

Today’s article will be a fairly simple one and is limited to Linux Mint users as we learn how to automate updates in Linux Mint. That seems like a good idea to me. Ideally, this will continue working without any intervention, but we’ll see…

So, I’m not sure how long this has been an option. I only noticed it fairly recently. If you’re not already aware, you can automate updates in Linux Mint. It’s a pretty simple task and won’t require much more than a mouse – or maybe a terminal and then a mouse.

This can be a touchy subject. I’m firmly in the camp of immediately installing all updates. I want my system to be as secure as possible, which means applying the updates as soon as they are available. So far, this mostly appears to work.

Updates often come right before public disclosure and proof-of-concept samples. While it’s true that an update can bork your system, that’s easily fixed and such a rare thing that I don’t even consider it as a reasonable reason not to apply updates.

I also consider it my duty, my obligation, to keep my systems secure. An insecure system doesn’t just impact you. An unsecured computer can be used as a proxy, a command center, a spam relay, or a node in a DDoS attack, among other things. As a good netizen, I keep my systems updated.

So, why not automate that stuff when I can? 

Automate Updates In Linux Mint:

In your system tray, down on the right, look to see if you have an icon that looks like a shield. If you do not see the icon, press CTRL + ALT + T and type in mintupdate. Both of those things will open the Update Manager in Linux Mint.

At some point along this path, you’ll be asked to enter your password. Do so.

That will open this window:

to automate updates in Linux Mint, start with opening up the update manager
Your theme may mean this has different colors or whatnot, but it should look like this.

Next, you’ll click on ‘Edit’.

You need to click on the Edit button to move to the next step of automating updates in Linus Mint
This is a pretty easy step. Heck, they’re all easy steps! You’ve got this! I’m sure of it!

You next want to open Preferences and click on Automation.

You'll need to edit the preferences to automate Linux Mint Updates.
Just in case you’re confused, I added an arrow for you! (My CDN is going to hate me.)

When you’ve done all of this, you’ll face a new screen.

This new screen is where you edit your automation settings. This new screen is where you enable automatic updates in Linux Mint. It looks like this when I’ve configured it to my liking:

Enabling automatic updates in Linux Mint via the Update Manager preferences.
You can configure those however you like, but I enable all of them. You do you, I guess.

Make sure you have a viable backup process.

As you can see, I’ve chosen all the things. I’ve chosen to automate all the updating that I can do. If anything, I wish I could increase the frequency. I suppose I could set up a cron job for this, but a handy GUI is fine for this task. This way will also update Spices and Flatpaks. So, there’s that.

I’ve had this setting enabled for a little while now and I’ve verified that it has been working as expected. If you want to automate updates in Linux Mint, you can do that – and it’s not even difficult.

Update:

No, it doesn’t appear to update Flatpaks. I’ve given it a few tries and it does not.

flatpaks are not automatically updated
I’ve waited and waited a few times. You have to update Flatpaks manually. So, there’s that…

Closure:

I like automatic updates. I use that sort of feature online with my various websites. Scheduled updates performing themselves is a good thing to me. You may be more cautious, but I throw caution to the wind. I haven’t had an update nuke my system beyond a 2-minute repair job in forever. I haven’t even had a 2-minute repair job in years. That’s good enough for me. You can make your own choices. Regardless of your choices, be sure to backup your system regularly.

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 site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

The Differences Between APT and APT-GET.

Today will be a brief essay-type of article where we simply discuss the differences between APT and APT-GET. This article is really only useful to you if you use a distro that supports this. Those would be distros in the Debian family, so distros like Ubuntu or Linux Mint.

This will be a brief article and an article where I cheated. I let AI write most of this for me. It seemed like a good task for ChatGPT. So, it was largely written by an ML (Machine Learning) model.

If you’re interested in this sort of thing, read on! Who knows, if it takes off I’ll do more of these types of articles. They don’t save much time because I still need to format the output and crafting the input can be a bit tricky.

Ah well… It’s still fun and informative!

The Differences Between APT and APT-GET:

Debian’s package management system has evolved over time, and two widely used tools for managing packages and software updates are apt-get and apt. Both tools serve similar purposes, but they differ in terms of user experience, functionality, and underlying technology.

apt-get was the traditional command-line tool used in Debian-based systems to handle package management tasks. It has been a reliable workhorse for system administrators and users alike. However, it had some limitations and lacked certain user-friendly features.

apt, on the other hand, stands for “Advanced Package Tool” and was introduced as a more user-friendly alternative to apt-get. It was designed to provide a more intuitive and streamlined user experience while retaining all the functionalities of apt-get.

One of the key differences between apt-get and apt is the command structure and user interface. apt-get commands are generally longer and less intuitive, while apt commands are more concise and easier to remember. For example, to install a package using apt-get, you might use:

Whereas with apt, the command becomes simpler:

Both commands perform the same function of installing the specified package, but apt provides a more user-friendly syntax.

More Differences:

Another notable difference is that apt has a more modern and user-friendly progress bar during package downloads and installations. It offers clearer and more informative output, making it easier for users to track the progress of their package operations.

Additionally, apt supports various new features and functionalities that were not present in apt-get. For instance, apt includes the apt autoremove command, which helps in removing unnecessary dependencies that were automatically installed but are no longer needed. This feature simplifies package management and helps keep the system clean by removing residual dependencies.

Furthermore, apt also integrates the functionality of other apt-get commands like apt-cache and apt-config, providing a more unified and cohesive package management experience. Users can perform tasks like searching for packages, checking their metadata, and managing configurations more efficiently within a single tool (apt).

Despite these differences, both apt-get and apt use the same underlying package management libraries and repositories. They share a common package database and can perform all the essential package management tasks such as installing, updating, upgrading, and removing packages.

In summary, apt is an evolution of apt-get, offering a more user-friendly interface, improved output readability, and additional functionalities while utilizing the same package management backend. Users transitioning from apt-get to apt will find the latter more intuitive and efficient, but both commands remain viable options for managing packages on Debian-based systems.

Closure:

Well, AI did a pretty good job of this. If you wanted to know the differences between apt and apt-get, now you do! You can decide for yourself which you prefer. As you’ve seen throughout these many articles, I default to apt. 

I also wrote this article with AI because I have a storm coming. I want to get this scheduled ahead of time. My brain only works for so long and I run out of ideas to write about. I flip through my notes and they look like articles I want to write, but I can’t figure out what to write about.

Basically, I only have so much creative energy and these articles consume that energy pretty quickly. Sometimes, I have spurts of creative energy and can write a few articles ahead, but that’s not something I can count on. Articles are generally written the night before they’re published. By then, I’ll have enough creative energy again.

I needed to do this the same day that I published an article because Mother Nature doesn’t care about my publication schedule. I’ve had a few years without major outages. It seems like that’s going to be different this year. I suppose I can be grateful for those times when I had no major outages. I’ll be warm, secure, and have electricity – I just may not have internet.

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 site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

Create A New User In Linux

If you’re familiar with Linux, you’ll already know that Linux is a multiuser system and today we’ll learn how to create a new user in Linux. This shouldn’t be a very complicated article. In some more advanced operations, you may be required to create a new user. This article will be about that.

If you aren’t already aware, you have a whole lot of users on your Linux system. You have more users than just your user account and certain things can be done by certain users. You can generally use an elevated account (or sudo) to overcome those user restrictions.

There may come a time when you want to share your device with another person. So, there’s another reason to create an additional user. If you’re managing a server with multiple users, there’s another reason to create a new user in Linux. There are any number of reasons why you’d like to create a new user and we’ll go over that process today.

We’ll just be using a couple of tools today. It’s not complicated.

useradd:

The main tool we’ll be using is the useradd command. This is a tool that’s certainly installed by default on any major distro. It’s a part of the basic building blocks we use to manage Linux, so this doesn’t require any installation. You can verify that you have useradd available with the following command:

The output should be:

If you check the man page, you’ll see this:

useradd – create a new user or update default new user information

So, as our goal is to create a new user, you can see that this is the correct tool for the job. I can’t think of a better tool for the job, as it should do everything behind the scenes as well.

passwd:

We’ll also be using the passwd command. This isn’t strictly necessary, but it’s in your best interest to set a user’s password. Once again, you won’t need to install anything and the following command will confirm that:

The output should match this output:

The text alone should let you know that this is a tool for setting passwords, but you can always refer to the man page to learn more. This is how passwd is described:

passwd – change user password

As I said, you don’t have to undergo this step but it’s in your best interests, from a security standpoint, to assign passwords to users who have any access to your system. And, as you can see, this is the right tool for the job of setting a user’s password.

Create A New User In Linux:

Of course, this is done in the terminal. As a general rule, you can press CTRL + ALT + T and your default terminal should open. That’s a fairly common shortcut that I mention often. You can also find a terminal in your application menu, pretty much regardless of which desktop environment you’re using and whichever Linux you’re using.

Creating The New User:

With your terminal now open, you’ll need to use elevated privileges, and the syntax is quite simple. To create a new user in Linux, the syntax follows:

This should be lowercase as Linux doesn’t like capital letters in usernames. So, for my username, the command would look like this:

You can confirm that you’ve added the user with the following command:

For example:

With your user firmly in place, you should set a password. Let’s do that next.

Set A Password For Your New User:

You’re almost always going to want a password for your new user. That’s easily done and also requires elevated permissions. You’ll need to continue using the terminal when you want to set a new password for the user.

The syntax for setting a password for your new user is as follows:

After you authenticate, the system will have you type in the password twice. It does this to ensure you’ve not made a mistake while typing, though it could be that you’ve made the same mistake twice.

So, be careful with this step. Otherwise, you have to find some way to reset the new user and the quickest way to do that would be to delete the user and start again.

Closure:

Yeah, I guess this counts as a short article. My most recent articles have been longer than this one. This one is about the length of my earliest articles, maybe slightly longer. The site has evolved!

Anyhow, you’ve learned how to create a new user in Linux. It shouldn’t matter which distro you’re using. The kernel you’re using shouldn’t impact this at all. It shouldn’t even matter what shell you’re using, this should simply work. If you want to create a new user, this is how you do 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 site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

Meta: The State Of Linux Tips #22

I don’t want to write a meta article today, but I said I would. I don’t prefer them, but I started writing them and continue to write them. Sometimes, though more seldom than not, they’re a small break between other articles. However, they’re mostly just a waste of time and energy.

But, I said I’d write this one today. By pure luck, it’s also a fine time to wrap up the end of 2023.

See…

THIS IS THE 500TH ARTICLE ON LINUX-TIPS!

That’s right. I’ve published 500 articles, many of them at an acceptable standard! Some have been abysmal and others are hits in the search engine results.

When I started this project, I did not know I’d keep it going this long. Even when Mother Nature conspired against me, which she’ll be doing again this coming Wednesday, I was able to cheat and at least claim that I had an article published. They were garbage, but they were articles that informed. They told you why you were getting no articles!

Mother Nature is entirely to blame. She does what she wants and there’s not a whole lot we can do to stop her when she’s bent on causing destruction. It is what it is, I suppose. Given my geographical location, I’m surprised that Mother Nature hasn’t caused more trouble. So far, we’ve been fairly lucky and able to get articles published.

 A Quick Blurb About 2023:

So, in 2023, we experienced a 61% increase in unique monthly visitors and we experienced a 68% increase in monthly visitors.

Combined, we’ve used more than .5 TB of traffic. CDN traffic was about 350 GB of traffic. Backend traffic was about 135 GB of traffic. That’s a lot of bits and bytes! 

Linux-Tips received $25 in donations over the year. This is definitely not a get-rich scheme. Any ad revenue goes straight to the CDN provider. Fortunately, they’re not all that expensive. You buy credits ahead of time and I’ve got a solid chunk of credits, though they’re wearing them down. It’s a new year, so I’ll add some more credits soon.

Google sent more than 116,000 visitors to Linux-Tips.
Google also accounts for (Chrome/Chromium/clones) 80% of the browsers.
Firefox is about 3.5% of the browsers.

Sites besides Google send me traffic!

Linux.org sent me more than 17.5k unique visitors and more than 51k visits.
Reddit sent me just 894 people – but they’re sort of 2nd on the list.
The real 2nd on the list is the old .gq site, but we’ll ignore that.

Here Are The Leading Articles:

Find Out Which Display-Manager You’re Using
Screenfetch vs. Neofetch, You Decide!
How To: Restart TeamViewer From The Terminal

What an odd assortment. You never know what search engines are going to like and you never know what people will be searching for. Ah well…

I also get some weird search engines.

You spend an average of 246 seconds on a page.

Most of you are from the US.
Most of you are technophiles.
Many of you are professionals.
Many of you are middle-class or higher.

I Get Other Traffic:

I get traffic from places I didn’t think I’d get traffic. These are some of the odd search engines out there, some of which give good results…

DuckDuckGo sent more than 6k visits.
StartPage sends about half of that.
Yandex sent about 1k.

I wasn’t indexed in Bing until recently. They sent like 500 people.

Those are tiny fractions of the overall traffic, but that’s okay. I’m happy to be helping people from all over the world. I even get traffic from China’s search engine.

The top 3 countries that send traffic would be:

United States Of America
Russia
India

However, that includes malicious traffic. The majority of malicious traffic also comes from (or uses a VPN and appears to be from) two of those countries. I’ll leave it to the reader to pick which two and I’ll leave it to the sociologists to decide why that is. We will not be digging into it in this article.

And, man… I get a lot of malicious traffic.

Just for one example, I’ve (not personally, it’s automated in many ways) dealt with more than 60,000 spam attempts in 2023 alone.

In just 24 hours, the site will be attacked 2,500 times – excluding spam attempts. Sometimes this number will double.

Don’t worry. This place is a fortress. You can knock on the door all day long and we should be good to go. And people do just that… They knock loudly and often! I use a multi-layer defensive system that has so far prevented unauthorized access. 

Closure:

So, yeah… It takes longer to write this sort of article than it does to write a regular article. There are all sorts of other facts and figures I could share, but that’s enough for an overview and I don’t want to invest that much time. I’ve invested enough in an article that’ll be appreciated by a few dozen people.

I think the important takeaway is that this is the 500th published article on Linux-Tips. If it wasn’t for your readership and encouragement, I’d have quit this long ago. So, thank you! Thank you to those who read and comment.

Thank you to those who contributed thoughts, insight, additional information, donations, and ad revenue. Every little bit goes into the CDN kitty. LOL It’s not enough to pay for the base hosting, so I just kinda ignore that and it’s automatically deducted so I don’t think about it.

It will be a while before we’re at 1,000 articles – but we just might get there. I suppose our next major milestones will be 600 articles and the 3-year mark. The 3-year mark is coming right up. It will be in April. It’s hard to imagine that I’ve been doing this for that long, but I have proof that I have! I have lots and lots of proof that I’ve been doing it for this long.

Heck, I can use this as proof in a courtroom. “No, your honor. If you look at my life you’ll see that I don’t have time for committing crimes! I’m too busy doing other stuff! A giant portion of my time is spent with the Linux community.”

I think that’d work in any reasonable court!

Ah well…

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 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.