Home How To'sLinux The Top Ten Most Basic Linux Commands

The Top Ten Most Basic Linux Commands

by Sagar Jain
63 views
basic linux commands

In a world that is bursting with diverse virtual environments and complex programs, it’s a necessity for any developer, young or old, to learn the most fundamental and basic Linux commands. Specifically, young Linux users like you must be able to handle the top ten commands below.

When something goes wrong with your operating system (OS), you don’t need to call a technician or browse the web for hours. If you can properly use the following codes in the terminal, then there’s no need to look for help.

Basic Linux Commands and Tech Tips

  • pwd

When you open the terminal, you’re also opening the operating system’s home directory. To determine your current directory, use the “pwd” command.

Doing so allows you to access the absolute path that generates from the root. The root is considered the base of your computer’s file system.

  • IS

If the “pwd” command is for knowing your location in a hierarchical file system, then this command determines the files present in the directory. To view hidden files, use “IS – a.”

  • cd

If you’re on the home page, enter the “cd” command to go to a particular documentary. For example, you must type in “cd Documents” to open the Documents folder.

It’s as easy as that, but do remember that all commands are case sensitive. Hence, if you fail to enter the right case of a symbol, nothing will pop-up. If you have a folder titled “Raspberry Pi,” then entering the command “cd Raspberry pi” will result in an error message.

  • rmdir and mkdir

The first command is used for deleting a folder. To delete a folder, enter on the terminal “rmdir name of folder.”

The second command is for creating a folder. To do this, type in “mkdir name of folder” and press enter.

  • touch

The mkdir command creates a folder, while the “touch” command is for generating a file. Don’t forget to include the file extension so that you will create a working file. For example, enter the “touch new.docx” to create a word document.

  • Cat

This command is for displaying the contents of a particular file. It can also be utilized to view programs.

  • echo

To quickly move data, such as texts, into a file, use the “echo” command. For example, type in “echo the most useful Linux commands >> new.docx.”

  • man

If you want to know how to use a specific command, the “man” command can help you. By typing “man command,” you can view the manual pages of a command.

  • cp

The cp command is used to copy files through the terminal instantaneously. If you don’t know which directory a file is located, this command can come in handy. It requires two arguments. To use it, type in the location where you want to transfer the file, and second, enter “cp name and extension of the file.”

  • Locate -i

If you want to find a file and do nothing with it, use “locate.” In a Linux system, this command can be used to browse hidden and missing files easily.

If you want to find document files containing the word “cat,” enter into the terminal “locate –I cat.” If you need to search for multiple words, separate each word with asterisks. For example, to look for a file containing the word “cache” and “minimal,” type in “locate –i *cache*terminal.”

Final Words

Whether you’re a beginner coder or an intermediate developer, the Basic Linux commands above can better understand the OS and your applications. You can also use them to manage an application and troubleshoot problems with system administration. You can apply the aforementioned basic commands to any Linux container, virtual machine (VM), bare metal, or development environment.

To Learn More Details Head Over Ubuntu Official Site.

Related Posts

Leave a Comment

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More