DEV Community

Cover image for How to Use the Linux Command Line Like a Pro
Harvey
Harvey

Posted on

How to Use the Linux Command Line Like a Pro

Learn how to use the Linux command line to save time and run commands faster. If you use a Unix-based operating system, such as Linux or macOS, you’re probably familiar with the shell, also called the command line.

The shell lets you interact with your system by entering commands that perform actions. When it comes to mastering the shell, there are a lot of possibilities for streamlining your work.

learn linux

Linux shells are a thing of beauty. They are the command line interfaces that power servers, minicomputers, supercomputers, embedded systems - and they are one of the most powerful tools in a system administrator's arsenal.

A lot of tech professionals use the command line to do their job.

Learning to use the Bash command line on a Linux-based operating system will change your life. It will save you hours of frustration and anger, level up your career, and improve your life in many other ways. If you want to practice the command line, I recommend this site

Show me the power

Servers

If you use a server or web server for your project, it most likely runs on Linux. You can connect to the server using ssh and control it using commands.

ssh user@ip
Enter fullscreen mode Exit fullscreen mode

Then login and you can control it with commands.

Search files

The power of the command line lies in its ability to perform tasks faster than you could with an interface alone. For example, if you want to find out where a file is located on your hard drive, you can use Nautilus/Dolphin (or Finder on a Mac) to locate it or just type one command:

find /home -type f -name filename.txt
Enter fullscreen mode Exit fullscreen mode

You can also use the fd command

> fd netfl
Software/python/imdb-ratings/netflix-details.py
Enter fullscreen mode Exit fullscreen mode

Navigate file system

You can navigate the file system with the cd and ls commands. ls shows you the files in the current directory. cd changes the directory.

Some commands include cd ~ go to home directory, cd dir enter directory, cd .. leave directory.

That's all you need to navigate your file system. Here you can find a large list of commands for Linux.

Top comments (0)