Skip to content

Most Simple Linux Commands You Can Use In Terminal

Linux Commands in Terminal

Linux is an open-source operating system for servers, computers, mobile devices, as well as embedded devices. It is supported on almost every computer platform. As a result, it makes a widely used operating system. However, most users might think Linux is a complex operating system. It is because they may think Linux is just for programmers. However, the more you learn about Linux, the more it turns out that it’s not that complicated. Especially learning simple Linux commands will make it easier for anyone to use it

When Linux launched in 1991, it started to attract attention with its open-source structure. It has gained popularity each day since it was released. People are free to make changes and then distribute them with their names.

To run Linux you need to use a shell that gives you access to the operating system. The shell is an interface that helps you control Linux. Most Linux shells have a graphical interface (GUI). It is mainly about further making the user experience better. It is well used when managing a VPS.

Since it is very effective users recommend using a command-line interface (CLI). With GUI, tasks that required a multi-process can be done in a few seconds.

You might be wondering about Linux now but need more to know about Linux commands. In this article, you will find some Linux commands that will help you use Linux both easily and effectively.

What Is A Linux Command?

It is a program that runs on the command line. The command line is an interface, the text that turns into instructions. The graphical user interface is an abstraction of the command line. A flag is a pass option to command that you are running. Most Linux commands give a help call with the flag -h.

The parameter is the input that we give the command, it will help this work. The argument can be anything you type in the terminal, but most often it is a file path. You can call flags with hyphens (-) and double hyphens (–)

Simple Linux Commands

Simple Linux Commands

You have to do a few things before starting Linux commands. The first thing to do is you should open the command line. The steps might be different due to the distribution you are using. You can check the command line in the Utilities. You can also review some simple Linux commands to get used to them. Try the basic Linux commands and then start right away.

pwd Linux Command

Use the pwd command to find out the working folder that you are in now.

A basic Linux command starts with a slash (/) and turns to a full path as all kinds of directories. Example of a full path home/username/statusReport

cd Linux Command

Use the cd command to navigate between Linux files and directories. This command requires the absolute path or directory name. However, this requirement changes depending on the directory you are in. For example, you are in /home/username/Documents and want to go a Photo subdirectory in documents. Then type the command like cd Photos. If you want to go to a new directory, /home/username/Movies, type cd and absolute directory path. It will be like this cd /home/username/Movies.

Some shortcuts to navigate your Linux system:

  • Type cd to go to the home folde
  • Type cd.. to move one directory up

Note that Linux shell is case-sensitive. Make sure to type the directory name the same as it is.

ls Command

Use the ls Linux command to see the contents of a directory. This command shows the content that you are working directory by default. You can type ls and the following the directory’s path to see the content of other directories. For example, to see the content of the documents, type ls /home/username/Documents.

Other variations with the ls command:

  • ls -al lists the directories and files with details (like an owner, size, etc.).
  • ls -a lists the hidden files.

cat Linux Command

Cat command is often used in all other commands in Linux. cat is short for concatenate. This command is used to list the contents of the file in the standard output. Type the cat then the file name and extension to run this command. For example, cat file.txt.

Other variations of the cat command:

  • cat > filename to a new file.
  • cat filename | tr a-z A-Z >output.txt to convert a file for upper or lower case.

Cp Linux Command

Use the cp Linux command to copy the directory that you are into a different directory in the Linux system. For example, cp scenery.jpg /home/username/Pictures will create you a scenery.jpg. It creates a copy from your current directory into the different directory (Pictures).

Terminal Commands

Mv Linux Command

Use the mv command to move files or to rename the files. This basic Linux command is very similar to the cp command. Type mv, filename, target directory to run this command. For example, mv file.txt /home/username/Documents. If you want to rename the files, a command will be mv oldname.ext newname.ext.

rmdir Command

Use rmdir command in order to delete a directory. This command only allows you to delete the empty directories.

rm Command

Use rm this basic Linux command to delete directories and the contents they have in them. You can use rm -r to delete only one directory.

Also, make sure that you check your command several times. Because it will delete everything and you can not undo this command.

mkdir Linux Command

Use the types of Linux mkdir command to create a new directory. For example, if you type mkdir Photo you will create a directory of Music.

Some other mkdir commands:

  • Type mkdir Music/Newfile to create a new directory inside another directory.
  • Type p to create a directory between existing directories.
  • use the p (parents) option to create a directory in between two existing directories. For example, mkdir -p Music/2020/Newfile. It will create a new file called 2020.

locate Linux Command

Use the locate command to locate a file. This command is similar to searching for something in Windows. You can use this command with -i to make the search case-insensitive. It will help you find files that you do not remember. Search a file with use an asterisk (*) if it contains two or more words. For example, locate -i philoshpy*lectures. It will search for the files that have word philosophy and lectures.

Find Linux Command

Use the find command in order to search and find files and directories in the Linux system. This command is similar to locate command. The difference is that you use the find command to find files in a particular directory. For example, find /home/ -name notes.txt, it will search and find the file called notes.txt. The command will search both in the home directory and its subdirectories.

See also  Cron Job: What It Is & Benefits

Some other variations of the find command:

  • find . -name notes.txt to find files in a directory you are using currently.
  •  / -type d -name notes. txt to search for directories use.

grep Linux Command

Use the grep command to search all the text within a given file. For example, type grep book notepad.txt to search for the word book in the notepad. Lines containing the searched word will be displayed exactly the same.

sudo Linux Command

Use sudo command to run the demand of the tasks administrative or root permissions. It might give an error easily if you did something wrong. So, this type of coding command is not recommended for daily use.

df Linux Command

Use the df Linux command in order to convey a report about space usage, in percent and KB on the system disk. Type df -m to review the report.

du Linux Command

Use the du command in order to see the disk usage of a file or directory. This command will show disk numbers of the disk usage. Add -h to the command line to see the usage in bytes, kilobytes, and megabytes.

head Linux Command

Use the head command to see the first lines of the text file. You will see the first ten lines by default. You can change this number as you want. To change the first number of lines to show, type head -n 3 filename.ext.

tail Linux Command

Use the tail command to show the last ten lines of the text file. This basic command is similar to the head command, but with a slight difference.

Type tail -n filename.ext to run tail command.

diff Linux Command

Use the diff command in order to compare the contents of two files. Asa soon as you run this command, it will show you the lines that do not match. This command is mostly used to make program changes by programmers. It saves to rewriting the entire source code. Type diff file1.ext file2.ext to run this command.

tar Linux Command

Use the tar command in order to archive multiple files into the tarball. The tarball is a command Linux file format that allows compression as an option. This command may be the complex one since it provides different types of functions. These are adding new files into existing archives, listing the content of an archive, etc.

Root Terminal

chmod Linux Command

Use this type of Linux chmod command in order to change the files and directories to execute permission to read and write.

chown Linux Command

Use chown Linux command in order to transfer or change the ownership of the specified username. Type chown linuxuser2 file.ext to make  linuxuser2 to file.ext.

ping Linux Command

Use the ping command in order to see a server connectivity status. For example type ping google.com, this will show your connectivity to Google. It also measures the response time.

history Linux Command

Linux system runs hundreds of commands every day. So, use the history command to review the commands you have commanded before.

man Linux Command

Use man command in order to learn certain commands right away. It will help you when you are not sure about the function of a specific coding command. This command will show instructions of a detailed command.

echo Linux Command

Use the echo command in order to turn some of the data into a file. Whatever you add to the text it will turn into a file.

top Linux Command

top command as a terminal and works like Task Manager in Windows. This command shows both a list of processes that are running and the CPU of each of the processes. Use this simple command in order to monitor the resource usage and define the process that needs to be removed.

uname Linux Command

Use the uname command in order to have detailed information about the Linux system. The uname is short for Unix Name. It gives details such as operating system, machine name and etc.

wget Linux Command

Use wget Linux command in order to download files from the internet. It is very useful and you can easily type wget followed by the link to download.

FAQ About Most Simple Linux Commands

What is Linux?

Linux is supported to work on the computer platform. It is an open-source operating system for servers, computers, mobile devices, and embedded devices.

What is Linux command?

Linux command is a program that runs on the command line. The command line is an interface that turns text instructions. What you input as your Linux command is called a parameter. This will help your command to work on the operating system.

Why do we use Linux commands?

Most people might think that Linux is complicated. It is because they are not get used to in the operating system. However, the more you learn and work on Linux, you will use Linux easily. To provide that Linux, has a list of commands to make it simple for anyone. You can think of Linux commands as shortcuts to run on the operating system.

How to learn about basic Linux commands?

You can use the man Linux command to see when you are not sure about the function of the command. This command will show you instructions for detailed information about a certain command.

What are some simple Linux commands?

Here are some simple Linux commands that can help:

pwd command- find out your working folder.
cd-to navigate between files and directories.
ls-to see the content of a directory
mv-move or rename the files.

Conclusion About Most Simple Linux Commands

Overall, in this article, we have talked about the most simple Linux commands that you can easily use. Linux is created to be practical and work on any device. However, new users might find the Linux operation system difficult. To use Linux efficiently, it will be great to learn simple commands. These will change the way people use the Linux system.

[Total: 1 Average: 5]

2 thoughts on “Most Simple Linux Commands You Can Use In Terminal”

  1. Pingback: Most Simple Linux Commands You Can Use In Terminal – Site ba?l???

  2. Pingback: Rank Math vs Yoast | Which One Is Better For SEO? - Seolator

Leave a Reply

Your email address will not be published. Required fields are marked *