aster.cloud aster.cloud
  • /
  • Platforms
    • Public Cloud
    • On-Premise
    • Hybrid Cloud
    • Data
  • Architecture
    • Design
    • Solutions
    • Enterprise
  • Engineering
    • Automation
    • Software Engineering
    • Project Management
    • DevOps
  • Programming
    • Learning
  • Tools
  • About
  • /
  • Platforms
    • Public Cloud
    • On-Premise
    • Hybrid Cloud
    • Data
  • Architecture
    • Design
    • Solutions
    • Enterprise
  • Engineering
    • Automation
    • Software Engineering
    • Project Management
    • DevOps
  • Programming
    • Learning
  • Tools
  • About
aster.cloud aster.cloud
  • /
  • Platforms
    • Public Cloud
    • On-Premise
    • Hybrid Cloud
    • Data
  • Architecture
    • Design
    • Solutions
    • Enterprise
  • Engineering
    • Automation
    • Software Engineering
    • Project Management
    • DevOps
  • Programming
    • Learning
  • Tools
  • About
  • DevOps
  • Programming
  • Software

10 Commands Every Linux User Should Know

  • root
  • March 12, 2020
  • 4 minute read

You may think you’re new to Linux, but you’re really not. There are 3.74 billion global internet users, and all of them use Linux in some way since Linux servers power 90% of the internet. Most modern routers run Linux or Unix, and the TOP500 supercomputers also rely on Linux. If you own an Android smartphone, your operating system is constructed from the Linux kernel.

In other words, Linux is everywhere.


Partner with aster.cloud
for your next big idea.
Let us know here.



From our partners:

CITI.IO :: Business. Institutions. Society. Global Political Economy.
CYBERPOGO.COM :: For the Arts, Sciences, and Technology.
DADAHACKS.COM :: Parenting For The Rest Of Us.
ZEDISTA.COM :: Entertainment. Sports. Culture. Escape.
TAKUMAKU.COM :: For The Hearth And Home.
ASTER.CLOUD :: From The Cloud And Beyond.
LIWAIWAI.COM :: Intelligence, Inside and Outside.
GLOBALCLOUDPLATFORMS.COM :: For The World's Computing Needs.
FIREGULAMAN.COM :: For The Fire In The Belly Of The Coder.
ASTERCASTER.COM :: Supra Astra. Beyond The Stars.
BARTDAY.COM :: Prosperity For Everyone.

But there’s a difference between using Linux-based technologies and using Linux itself. If you’re interested in Linux, but have been using a PC or Mac desktop, you may be wondering what you need to know to use the Linux command line interface (CLI). You’ve come to the right place.

The following are the fundamental Linux commands you need to know. Each is simple and easy to commit to memory. In other words, you don’t have to be Bill Gates to understand them.

1. ls

You’re probably thinking, “Is what?” No, that wasn’t a typographical error – I really intended to type a lower-case L. ls, or “list,” is the number one command you need to know to use the Linux CLI. This list command functions within the Linux terminal to reveal all the major directories filed under a respective filesystem. For example, this command:

ls /applications

shows every folder stored in the applications folder. You’ll use it to view files, folders, and directories.

All hidden files are viewable by using the command ls -a.

2. cd

This command is what you use to go (or “change”) to a directory. It is how you navigate from one folder to another. Say you’re in your Downloads folder, but you want to go to a folder called Gym Playlist. Simply typing cd Gym Playlist won’t work, as the shell won’t recognize it and will report the folder you’re looking for doesn’t exist. To bring up that folder, you’ll need to include a backslash. The command should look like this:

cd Gym\ Playlist

To go back from the current folder to the previous one, you can type in the folder name followed by cd ... Think of the two dots like a back button.

Read More  Android Dev Summit 2019 | Adopt Wide Color Gamut

3. mv

This command transfers a file from one folder to another; mv stands for “move.” You can use this short command like you would drag a file to a folder on a PC.

For example, if I create a file called testfile to demonstrate all the basic Linux commands, and I want to move it to my Documents folder, I would issue this command:

mv /home/sam/testfile /home/sam/Documents/

The first piece of the command (mv) says I want to move a file, the second part (home/sam/testfile) names the file I want to move, and the third part (/home/sam/Documents/) indicates the location where I want the file transferred.

4. Keyboard shortcuts

Okay, this is more than one command, but I couldn’t resist including them all here. Why? Because they save time and take the headache out of your experience.

CTRL+K Cuts text from the cursor until the end of the line

CTRL+Y Pastes text

CTRL+E Moves the cursor to the end of the line

CTRL+A Moves the cursor to the beginning of the line

ALT+F Jumps forward to the next space

ALT+B Skips back to the previous space

ALT+Backspace Deletes the previous word

CTRL+W Cuts the word behind the cursor

Shift+Insert Pastes text into the terminal

Ctrl+D Logs you out

These commands come in handy in many ways. For example, imagine you misspell a word in your command text:

sudo apt-get intall programname

You probably noticed “install” is misspelled, so the command won’t work. But keyboard shortcuts make it easy to go back and fix it. If my cursor is at the end of the line, I can click ALT+B twice to move the cursor to the place noted below with the ^ symbol:

sudo apt-get^intall programname

Now, we can quickly add the letter s to fix install. Easy peasy!

Read More  Learn To Debug Code With The GNU Debugger

5. mkdir

This is the command you use to make a directory or a folder in the Linux environment. For example, if you’re big into DIY hacks like I am, you could enter mkdir DIY to make a directory for your DIY projects.

6. at

If you want to run a Linux command at a certain time, you can add at to the equation. The syntax is at followed by the date and time you want the command to run. Then the command prompt changes to at> so you can enter the command(s) you want to run at the time you specified above

For example:

at 4:08 PM Sat
at> cowsay 'hello'
at> CTRL+D

This will run the program cowsay at 4:08 p.m. on Saturday night.

7. rmdir

This command allows you to remove a directory through the Linux CLI. For example:

rmdir testdirectory

Bear in mind that this command will not remove a directory that has files inside. This only works when removing empty directories.

8. rm

If you want to remove files, the rm command is what you want. It can delete files and directories. To delete a single file, type rm testfile, or to delete a directory and the files inside it, type rm -r.

9. touch

The touch command, otherwise known as the “make file command,” allows you to create new, empty files using the Linux CLI. Much like mkdir creates directories, touch creates files. For example, touch testfile will make an empty file named testfile.

10. locate

This command is what you use to find a file in a Linux system. Think of it like search in Windows. It’s very useful if you forget where you stored a file or what you named it.

Read More  The Linux Foundation Releases The State Of Software Bill Of Materials (SBOM) And Cybersecurity Readiness Research

For example, if you have a document about blockchain use cases, but you can’t think of the title, you can punch in locate -blockchain or you can look for “blockchain use cases” by separating the words with an asterisk or asterisks (*). For example:

locate -i*blockchain*use*cases*.

There are tons of other helpful Linux CLI commands, like the pkill command, which is great if you start a shutdown and realize you didn’t mean to. But the 10 simple and useful commands described here are the essentials you need to get started using the Linux command line.

 

Sam Bocetta

This article is republished from opensource.com


For enquiries, product placements, sponsorships, and collaborations, connect with us at [email protected]. We'd love to hear from you!

Our humans need coffee too! Your support is highly appreciated, thank you!

root

Related Topics
  • CLI
  • Command Line
  • Linux
You May Also Like
View Post
  • Software
  • Technology

Canonical Releases Ubuntu 25.04 Plucky Puffin

  • April 17, 2025
View Post
  • Software
  • Technology

IBM Accelerates Momentum in the as a Service Space with Growing Portfolio of Tools Simplifying Infrastructure Management

  • March 27, 2025
Vehicle manufacturing
View Post
  • Software

IBM Study: Vehicles Believed to be Software Defined and AI Powered by 2035

  • December 12, 2024
aster-cloud-tux-gaming
View Post
  • Computing
  • Gears
  • Software

5 best Linux distributions for gamers in 2024

  • September 11, 2024
Crab
View Post
  • Gears
  • Learning
  • Software

The Best Friends for a Rustacean. Top Books in Learning Rust.

  • August 25, 2024
Coffee | Laptop | Notebook | Work
View Post
  • Software

The Hidden Economy Of Open Source Software

  • April 28, 2024
Redis logo
View Post
  • Platforms
  • Software

Redis Moves To Source-Available Licenses

  • April 2, 2024
View Post
  • Software
  • Technology

Charmed MongoDB Enters General Availability

  • March 26, 2024

Stay Connected!
LATEST
  • college-of-cardinals-2025 1
    The Definitive Who’s Who of the 2025 Papal Conclave
    • May 7, 2025
  • conclave-poster-black-smoke 2
    The World Is Revalidating Itself
    • May 6, 2025
  • 3
    Conclave: How A New Pope Is Chosen
    • April 25, 2025
  • Getting things done makes her feel amazing 4
    Nurturing Minds in the Digital Revolution
    • April 25, 2025
  • 5
    AI is automating our jobs – but values need to change if we are to be liberated by it
    • April 17, 2025
  • 6
    Canonical Releases Ubuntu 25.04 Plucky Puffin
    • April 17, 2025
  • 7
    United States Army Enterprise Cloud Management Agency Expands its Oracle Defense Cloud Services
    • April 15, 2025
  • 8
    Tokyo Electron and IBM Renew Collaboration for Advanced Semiconductor Technology
    • April 2, 2025
  • 9
    IBM Accelerates Momentum in the as a Service Space with Growing Portfolio of Tools Simplifying Infrastructure Management
    • March 27, 2025
  • 10
    Tariffs, Trump, and Other Things That Start With T – They’re Not The Problem, It’s How We Use Them
    • March 25, 2025
about
Hello World!

We are aster.cloud. We’re created by programmers for programmers.

Our site aims to provide guides, programming tips, reviews, and interesting materials for tech people and those who want to learn in general.

We would like to hear from you.

If you have any feedback, enquiries, or sponsorship request, kindly reach out to us at:

[email protected]
Most Popular
  • 1
    IBM contributes key open-source projects to Linux Foundation to advance AI community participation
    • March 22, 2025
  • 2
    Co-op mode: New partners driving the future of gaming with AI
    • March 22, 2025
  • 3
    Mitsubishi Motors Canada Launches AI-Powered “Intelligent Companion” to Transform the 2025 Outlander Buying Experience
    • March 10, 2025
  • PiPiPi 4
    The Unexpected Pi-Fect Deals This March 14
    • March 13, 2025
  • Nintendo Switch Deals on Amazon 5
    10 Physical Nintendo Switch Game Deals on MAR10 Day!
    • March 9, 2025
  • /
  • Technology
  • Tools
  • About
  • Contact Us

Input your search keywords and press Enter.