Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →Scan for outdated or missing drivers - takes under a minuteDriver Scan →“Open” can mean three different things in Linux: launch a file in its normal desktop application, read it inside the terminal, or edit it. Use xdg-open file for the first, less file for read-only viewing, and nano file for editing.
xdg-open report.pdf
less notes.txt
nano notes.txt
Open a file with its default desktop application
On a Linux desktop, run:
xdg-open path/to/file
xdg-open asks the desktop environment to use the application associated with that file type. A PDF might open in a PDF viewer, an image in an image viewer, and an HTML document in a browser. The exact application depends on your installed software and configured file associations; it is not fixed across distributions. See the xdg-open manual.
Common examples
xdg-open report.pdf
xdg-open image.png
xdg-open /home/alex/Documents/report.pdf
xdg-open "./My Documents/notes.txt"
xdg-open .
The final command opens the current directory in the default file manager. A period (.) means the current working directory.
xdg-open is intended for a graphical desktop session. It may not be useful from a headless server, a container, or an SSH session without graphical access, and its manual advises against running it as root.
Free tools Windows power users keep installed
One-click scans. No signup required.
#1 Best Overall
- Bootable Kali Linux Environment – No installation required
- Large Linux Command Reference Mousepad (Desk Size)
- Ideal for Cybersecurity Labs & Training
- Plug & Boot on Compatible Systems
- Complete 2-Item Bundle – Functional & Practical
Read a text file inside the terminal
Use less for interactive reading
For a file that may be longer than one screen, use:
less filename.txt
less leaves the file unchanged and lets you move through it without flooding the terminal. Typical controls are:
Space— next pageb— previous pageUp/Down— move one lineg— beginning of the fileG— end of the file/word— search for a wordn— next search matchq— quit and return to the shell
Ubuntu’s command-line tutorial recommends less when output does not fit comfortably on one terminal screen: Ubuntu Linux command-line tutorial.
Use cat for short text
cat filename.txt
cat writes file contents to standard output. It is convenient for a short file or for sending content into another command, but a large file can scroll past the terminal quickly. The GNU Coreutils documentation and Ubuntu cat manual describe its behavior.
Display only part of a file
For quick inspection, use the GNU Coreutils utilities:
head -n 20 filename.txt
tail -n 20 filename.txt
tail -f application.log
headprints the beginning of a file.tailprints the end.tail -fkeeps displaying new data appended to a growing file, which is useful for logs; pressCtrl+Cto stop it.
Reference: GNU Coreutils manual.
Edit a file from the terminal
Nano: the beginner-friendly option
nano notes.txt
Nano opens the file in the terminal and may create it when the path does not exist. Standard Nano builds show shortcuts along the bottom; commonly, Ctrl+O saves and Ctrl+X exits. Because this is an editor, saving changes the file.
Vim: a more advanced alternative
vim notes.txt
Vim is powerful but has a steeper learning curve. Neither editor is guaranteed to be installed on every minimal Linux system.
Rank #2
- NOTE: All poster prints may vary slightly from what you see on your screen due to the resolution and colour profile of your device. These prints look AMAZING when displayed in a frame or straight on the wall.
- QUALITY: The poster is printed on canvas. It is waterproof,moisture proof and high tensile strength.The poster has rich printing color and fine texture.
- DECORATION: TOP MODERN! Really eye-catching! Ideal for all modern graphic & photographic designs. Your wall / room gets very special lightness & beauty.
- FEATURES: We are good at making canvas posters, making high-quality posters is our pursuit, Different from paper posters, canvas posters have better quality and longer shelf life.
- If you are not satisfied with our print paintings, please feel free to contact us.
Use paths safely
Relative and absolute paths
A relative path starts from the directory shown by pwd; an absolute path starts at the filesystem root:
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →pwd
ls
xdg-open ./report.pdf
xdg-open ../Downloads/report.pdf
xdg-open /home/alex/Downloads/report.pdf
less ~/Documents/notes.txt
. means the current directory, .. its parent, ~ your home directory, and / the filesystem root.
Spaces and shell-special characters
Quote a path containing spaces or characters such as parentheses and ampersands:
xdg-open "My Report.pdf"
less "Project Files/notes (draft).txt"
You can also escape spaces with backslashes:
xdg-open My Report.pdf
Without quoting or escaping, the shell treats each space-separated word as a separate argument. Tab completion is often easiest: type part of the name and press Tab.
Hidden files
Unix names beginning with a dot are hidden. List them with:
ls -la
Then open one by specifying its path, for example:
less ~/.bashrc
xdg-open ~/.some-document
Be cautious when editing configuration files such as ~/.bashrc; a syntax mistake can affect later shell sessions.
Names beginning with a hyphen
A name such as -report.pdf can be mistaken for an option. Prefix it with ./ or use an absolute path:
Rank #3
- NOTE: All poster prints may vary slightly from what you see on your screen due to the resolution and colour profile of your device. These prints look AMAZING when displayed in a frame or straight on the wall.
- QUALITY: The poster is printed on canvas. It is waterproof,moisture proof and high tensile strength.The poster has rich printing color and fine texture.
- DECORATION: TOP MODERN! Really eye-catching! Ideal for all modern graphic & photographic designs. Your wall / room gets very special lightness & beauty.
- FEATURES: We are good at making canvas posters, making high-quality posters is our pursuit, Different from paper posters, canvas posters have better quality and longer shelf life.
- If you are not satisfied with our print paintings, please feel free to contact us.
less ./-report.txt
xdg-open ./-report.pdf
xdg-open /home/alex/-report.pdf
The xdg-open manual specifically recommends an explicit relative path, an absolute path, or a file URL for this case.
Find out what a file is
When the type is unknown, inspect the path before choosing a command:
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
ls -l path/to/file
file path/to/file
Use less for readable text, xdg-open for a desktop-associated format, or a format-specific utility for archives, media, and other data. Avoid sending an unknown binary file through cat; the output can be unreadable and may temporarily disturb terminal display behavior.
When a command fails
The path is wrong or the file is missing
Check your location and spelling:
pwd
ls -l path/to/file
Linux paths are generally case-sensitive. Check for missing quotes around spaces and remember that a relative path is resolved from the current directory. To search your home directory:
find ~ -name 'report.pdf'
xdg-open reports a failure when the supplied file does not exist, as documented in its manual.
You lack permission
ls -l shows the file permissions. Reading a file requires read permission on the file and access to each directory in its path. Opening a program also requires the appropriate execute permission. Do not treat sudo as a general fix, especially for xdg-open, which is not recommended as root.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallCrashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteThere is no graphical session
On a server, virtual console, container, or ordinary SSH connection, use terminal tools such as:
Rank #4
less file.txt
nano file.txt
If you need to view the file on your own computer, copy it from the remote host with a separate transfer command, for example:
scp user@server:/path/to/file .
Running xdg-open over SSH acts in the remote environment; it does not automatically open the file on your local desktop.
No default application or the wrong application
If no handler is configured, install a suitable application or set a default in your desktop environment. For diagnosis, query the detected MIME type and its default handler:
xdg-mime query filetype path/to/file
xdg-mime query default "$(xdg-mime query filetype path/to/file)"
This advanced check is useful when an extension is misleading, the MIME type is unexpected, or the configured application is unavailable. For a one-off opening, you can invoke a known program directly, such as evince report.pdf, gedit notes.txt, or firefox page.html; these names are examples, not universal commands.
What about gio open or open?
gio open file is a common alternative on GNOME systems, but it depends on the GNOME/GIO stack and may be absent elsewhere. KDE also has desktop-specific utilities. xdg-open is the more portable desktop-oriented recommendation when it is installed.
Do not assume that bare open file is the Linux equivalent of macOS. Linux distributions and packages may assign that name different behavior.
Quick Recap
Quick reference
| Goal | Command | Notes |
|---|---|---|
| Default graphical application | xdg-open file |
Needs a working desktop session |
| Read text interactively | less file |
Press q to quit |
| Print a short text file | cat file |
Writes contents to standard output |
| Show beginning | head file |
GNU/Linux utility |
| Show end | tail file |
Useful for logs |
| Follow a growing log | tail -f file |
Stop with Ctrl+C |
| Edit text | nano file |
Saving changes the file |
| Open the current folder | xdg-open . |
Uses the default file manager |
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
Recommended Free Tools




