Skip to content

Both.org

News, Opinion, Tutorials, and Community for Linux Users and SysAdmins

Primary Menu
  • About Us
  • Computers 101
    • Hardware 101
    • Operating Systems 101
  • End of 10 Events
    • Wake Forest, NC, — 2025-09-20
  • Linux
    • Why I use Linux
    • The real reason we use Linux
  • My Linux Books
    • systemd for Linux SysAdmins
    • Using and Administering Linux – Zero to SysAdmin: 2nd Edition
    • The Linux Philosophy for SysAdmins
    • Linux for Small Business Owners
    • Errata
      • Errata for The Linux Philosophy for SysAdmins
      • Errata for Using and Administering Linux — 1st Edition
      • Errata for Using and Administering Linux — 2nd Edition
  • Open Source Resources
    • What is Open Source?
    • What is Linux?
    • What is Open Source Software?
    • The Open Source Way
  • Write for us
    • Submission and Style guide
    • Advertising statement
  • Downloads
  • Home
  • Top 5 mistakes every new Linux terminal user makes
  • Linux

Top 5 mistakes every new Linux terminal user makes

Avoid these comman mistakes, and find out how to become an expert in the terminal.
Seth Kenlon January 26, 2024 7 minutes read
Image of a keyboard

Photo by Chris J. Davis, Unsplash License

1

Learning to use the terminal is an important step in becoming a true power user of Linux, but it’s easy (and normal) to make mistakes along the way. Here are the top 5 mistakes new terminal users make, and what you can learn from them.

1. Current working directory

When you first open a terminal, your current working directory is your home folder. You have access to all those directories you see in your home directory every time you open a file manager (Desktop, Documents, Downloads, Music, Pictures, and Videos). You can verify your location with the pwd command:

$ pwd
/home/seth

You can list the files and folders within your current directory with the ls or dir or tree commands:

$ ls
Desktop  Documents  Downloads
Music    Pictures   Videos

But you don’t usually stay in one place while using the terminal. You frequently move from folder to folder so you can open or modify or edit files. It’s easy to get lost, forgetting what directory you’re in and what files are around you.

Lesson learned: When working in the terminal, it’s important to regularly verify your current working directory with pwd so you don’t accidentally issue a command you intended to run in a different location.

2. Use interactive options when using wildcards

Wildcards are great shorthand to make command entry faster, and to perform bulk actions on lots of files. However, they can be dangerous when you get them wrong.
It’s easy to process hundreds of the wrong files by using a wildcard in the wrong directory, or by using a wildcard that’s too broad.

For example, suppose you want to run a sed command on all HTML files in a directory, so you run this:

$ sed --in-place 's/day/night/g' *ml

Job done, until you find out that you accidentally ran that command on all your XML files, too.

Lesson learned: Run a safe test command on the wildcard you think you want to target before making a change. Some commands have a literal --dry-run option. Others have an --interactive option that forces the command to prompt you to confirm that you want to carry out the action. Sometimes the logic is reversed: a command refuses to make a major change unless you use a command (for example, sed doesn’t write changes to a file without the --in-place option or redirection).

When in doubt, improvise. You can always “expand” a wildcard using the echo command:

$ echo ./*ml
./four.html ./one.xml ./three.html ./two.xml
$ echo ./*tml
./four.html ./three.html

3. File paths

Many new terminal users don’t understand where files are located within the file system. It’s not a common mistake to make on the desktop because there are visual reminders there. You wouldn’t try to double-click on a document to open it if there was no icon to double-click. It’s easy to assume that the terminal application contains all your files all at once, but the terminal is, by design, limited in scope. Were the terminal to have access to every file everywhere on your system all at once, you’d end up accidentally renaming and moving and copying a lot more files than intended. Specificity is a super power, and it’s defined by the file path.

A file path describes where a file exists in a file system. A full (or “absolute”) file path always starts from the single folder at the start of your operating system, indicated by just a /, and then lists each folder within that folder until it traces the path to a specific file. For example, I have a file called IMG_0001.JPG in my Pictures directory. You probably have a mental image of where that file is and how you’d get there on the desktop. But for the terminal to understand how to find it, the location must be expressed as /home/seth/Pictures/IMG_0001.JPG.

An absolute file path is definitive. The terminal always understands an absolute file path, no matter what your current working directory is.

The absolute path to a file can be unwieldy, though. Once you understand absolute paths, you can abbreviate any path to a relative file path.

A relative file path is based on your current location in the terminal. As long as you’re in the Pictures folder, the full path /home/seth/Pictures/IMG_0001.JPG can be shortened to just IMG_0001.JPG, or ./IMG_0001.JPG for added clarity (the . indicates no movement from your current location, and the / is a directory separator as usual).

But suppose your current working directory was your home directory. Your Pictures folder is located in your home directory, so to get to IMG_0001.JPG you have to enter Pictures first. The relative path in that case is ./Pictures/IMG_0001.JPG or just Pictures/IMG_0001.JPG.

Lesson learned: An absolute file path always starts from the start of a file system. A relative file path changes based on your location. The terminal understands both. For new users, the absolute file path is the most explicit and exact way to reference a file, so practice using them until you’re comfortable with the concept of file paths.

4. Executable permissions

By default, most files aren’t executable. You can’t run them like an application, because most files are meant to be opened in an application. That’s not true for shell scripts, though.

Shell scripts are text files containing a list of commands, and they’re meant to be run like an application. They’re a powerful way to string existing commands together to form a new custom command. However, because a shell script starts out as a regular text file, it’s not seen by your terminal as an executable entity.

To execute a file as an application, you can grant it executable permission with the chmod command:

$ chmod +x ./example.sh

Alternatively, you can run the file in a sub-shell:

$ bash ./example.sh

Notice that in these examples, I use the ./ notation as if the example.sh shell script exists in my current directory.

5. Typing errors

It sometimes feels like the more you type, the more you’re getting done. In a terminal, though, typing too much is one of the best ways to introduce mistakes.

When you try to type a long and complex command, you’re liable to spell something wrong or use the wrong option. When you try to type a filename or a file path, you might forget to escape special characters (like spaces). The errors aren’t usually catastrophic, but they’re frustrating and time consuming.

Lesson learned: There are several ways to ensure you’re entering the correct commands into your terminal:

  • Copy and paste: If you’re using a command you found on a trusted website, copy it in your browser and then paste it into your terminal using Ctrl+Shift+V or right-click and select Paste.
  • TAB: You can type part of a command or file path, and then press the TAB key on your keyboard for either auto-completion or for suggested completions. Use it even when you don’t think you need it. It’ll save you errors every single time, even when it appears to not work (hint: it’s not working because you’re trying to auto-complete something that’s not where you think it is).
  • Drag-and-drop: It’s the 21st century! You can drag a file or folder from anywhere on your computer, and drop it into your terminal. It gets replaced by its absolute path automatically.

Practice makes perfect

To get good in the terminal, you have to use it as often as you can. You don’t have to use it for “serious” work at first, and you arguably shouldn’t, but you can and should do simple exercises in the terminal. Understand file paths, get used to wildcards, learn shortcuts, use the TAB key. The biggest mistake you can make when learning the terminal is to not use the terminal, so open it up every day, do your exercise, and you’ll be an expert in the terminal in no time.

Tags: Bash Linux SysAdmin

Post navigation

Previous: The impact of the Linux philosophy
Next: Millions of Openly Licensed Images and More at Your Fingertips

Related Stories

wfh_work_home_laptop_work
  • Advanced
  • Command Line
  • Linux
  • Tools

Beyond the Basics: Advanced Text Processing with awk and sed

Saikat Goswami May 8, 2026
retro_old_unix_computer
  • Fortran 77
  • Linux
  • Programming

5 things to know when learning FORTRAN 77

Jim Hall May 6, 2026
Typewriter-lead
  • Books
  • Linux
  • Printing
  • Using and Administering Linux

Book Update — Chapter 26, Printers

David Both May 1, 2026

Random Quote

There is no reason for any individual to have a computer in their home.

— Ken Olson

Why I’ve Never Used Windows

On February 12 I gave a presentation at the Triangle Linux Users Group (TriLUG) about why I use Linux and why I’ve never used Windows.

Here’s the link to the video: https://www.youtube.com/live/uCK_haOXPFM 

Why there’s no such thing as AI

Last October at All Things Open (ATO) I was interviewed by Jason Hibbits of We Love Open Source. It’s posted in the article “Why today’s AI isn’t intelligent (yet)“.

Technically We Write — Our Partner Site

Our partner site, Technically We Write, has published a number of articles from several contributors to Both.org. Check them out.

Technically We Write is a community of technical writers, technical editors, copyeditors, web content writers, and all other roles in technical communication.

Subscribe to Both.org

To comment on articles, you must have an account.

Send your desired user ID, first and last name, and an email address for login (this must be the same email address used to register) to subscribe@both.org with “Subscribe” as the subject line.

You’ll receive a confirmation of your subscription with your initial password as soon as we are able to process it.

Administration

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

License and AI Statements

Both.org aims to publish everything under a Creative Commons Attribution ShareAlike license. Some items may be published under a different license. You are responsible to verify permissions before reusing content from this website.

The opinions expressed are those of the individual authors, not Both.org.

You may not use this content to train AI.

 

Advertising Statement

Both.org does not sell advertising on this website.


Advertising may keep most websites running—but at Both.org, we’re committed to keeping our corner of the web ad-free. Both.org does not sell advertising on the website. Nor do we offer sponsored articles at this time. We’ll update this page if our position on sponsorships changes.

We want to be open about how the website is funded. Both.org is supported entirely by David Both and a few other dedicated individuals.

 

 

Copyright © All rights reserved. | MoreNews by AF themes.