Top 20 Linux Terminal Commands to try for a Beginner

If you are a newbie to Linux, these top 20 Linux commands for every beginner should help you in kickstarting the command line usage in the Linux Terminal.

Linux Terminal commands may give an impression of being complex to use for a beginner, but as you learn, you realize how easy, powerful, and effective they are. Tasks that could undergo multi-step processes through GUI can be executed quickly by typing commands into the terminal.

Are you looking forward to getting started with Linux systems? Below are 20 useful commands you can use to manage tasks in your system.

Useful Linux Terminal Commands for a Beginner

1. ls command

The LS (list file) command shows the files and folders present in the path provided. When executed alone without giving any path, the LS command will display the current working directory’s contents. This command can be combined with various options to provide a detailed output. To see these arguments execute the ls –help command.

Syntax:

ls [-options] [path]

Below is an illustration of the LS commands and the various options you can include.

LS command
LS command

2. pwd Command

The PWD (Print Working Directory) command is an environment variable that shows the current working directory path. PWD only supports two arguments: -L and -P.

  • pwd -L: Shows the symbolic path
  • pwd -P: Shows the actual path

Note: The two arguments L and P are executed in caps lock.

When executed without any of these arguments, PWD will print the actual path. Below is an example of the PWD command.

Syntax:

pwd [-options]

PWD command
PWD command

3. cd command

The CD (change directory) command is used to navigate through directories. To move to a directory-A, all you need to do is call the CD command and give the path to directory-A. When executed alone, the CD command will drop to the home directory. Below are some options you can use with CD command:

  • cd /: This command will take you to the root directory.
  • cd ..: This command will take you to the parent directory of the current directory.
  • cd ~: This works similar to the CD command and will drop you to the home directory.

Syntax:

cd [options/directory-path]

CD command
CD command

4. man command.

The man command shows the user manual of command right in the Linux shell. It prints detailed information about the command, including NAME, SYNOPSIS, DESCRIPTION, OPTIONS, EXIT STATUS, RETURN VALUES, ERRORS, FILES, VERSIONS, EXAMPLES, AUTHORS, and more.

Syntax:

man [-options] [command]

man command
man command

5. mkdir command

The MKDIR command is used to create a new directory. If a path is not provided, the new directory will be made in the current working directory. mkdir command is also used to set user permissions on the directories created.

Syntax:

mkdir [-options] [directory-path-name]

mkdir command
mkdir command

6. locate command

The locate command is used to find files in the Linux system by name. It might sound similar to the find command but works better and faster. When a search is initiated, unlike the find command, which will go through the filesystem looking for that particular name, locate will look into the database. This database contains bits and parts of the file and their paths.

Syntax:

locate [-option] [pattern]

Locate command
Locate command

7. echo

The echo command is used to print the text passed as an argument. It is mainly used in shell scripting and batch file processing. It prints the output on the terminal, but when used with the ‘>>’ argument, it can print the output to a file.

Syntax:

echo [-option] [text/string]

echo command
echo command

8. history command

When run in the terminal, the history command displays all the commands that were previously executed by the user.

Syntax:

history

history command
history command

9. ping command

The PING (Packet Internet Groper) command checks the connectivity status between the host to a server. Ping uses ICMP(Internet Control Message Protocol) and sends an ICMP echo to the server. It takes an input of an IP address or URL.
Syntax:

ping [-options] [URL/IP address]

ping command
ping command

10. sudo command

The SUDO (Super User DO) command enables the performance of a task that requires administrative privileges. Therefore, if you run a command and you get an output like “permission denied,” use the SUDO command as illustrated below.

Syntax:

sudo [command]

sudo command
sudo command

11. wget command

The wget command allows you to download files from the internet. By typing wget followed by the download link initiates the download.
Syntax:

wget [-options] [URL]

wget command
wget command

12. kill command

The kill command terminates an unresponsive program manually by sending a signal that instructs the app to stop running. To view all signals that you can send, execute the command kill -l command. When executed without any option, the KILL command will send the default TERM signal, ‘Terminate.’

Syntax:

kill [-signal] [PID]

kill command
kill command

13. clear

The clear command does away with all the clutter on the terminal, making it look like it has just been launched. It clears the Terminal screen.

Syntax:

clear

14. top command

The TOP command is used to lists all running processes in the system.
Syntax:

top [-options]

TOP command
TOP command

15. head command

The head command shows the first N(number) of data in a file. If no options are specified, this command will print the first ten(10) lines in a file.
Syntax:

head [-options] [file-name]

Head command
Head command

16. tail command

The tail command is the direct opposite of the head command. It prints the last N(number) of lines in a file. If no option is provided, it will print the last ten(10) lines by default.

Syntax:

tail [-option] [file-name]

Tail command
Tail command

17. rm command

The rm (remove) command is used to delete files, folders, symbolic links, etc. from the file system. The rm command alone, however, cannot remove directories. To do so, you will need to use the ‘-r’ (recursive) option.

Syntax

rm [-options] [file/folder-name]

rm command
rm command

18. rmdir command

The rmdir command deletes an empty directory from the system.

Syntax:

rmdir [-options] [directory-name]

rmdir command
rmdir command

19. mv command

The MV (move) command has two main functions:

  • Rename files and directories
  • Move a file from one location to another

Syntax

mv [options] [file-name]

mv command
mv command

20. exit command

The exit command is used to exit the shell where it is currently running. It can also be used to close the Terminal window.
Syntax:

exit

Those are 20 basic commands that would greatly help you manage and execute various tasks on your system. If you have any difficulties with a command, use the –help option or see the user manual with the man command.

Arun Kumar
Arun did his bachelor in computer engineering and loves enjoying his spare time writing for FOSS Linux. He uses Fedora as the daily driver and loves tinkering with interesting distros on VirtualBox. He works during the day and reads anything tech at night. Apart from blogging, he loves swimming and playing tennis.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

STAY CONNECTED

23,241FansLike
394FollowersFollow
16SubscribersSubscribe

LATEST ARTICLES

MUST READ

The Ubuntu Cinnamon Remix brings together Linux Mint's Cinnamon desktop with the Ubuntu Core. While some users are welcoming the new flavor of Ubuntu with open arms, others are scratching their heads, wondering where it fits in.
The wait is finally over (almost) for all you Ubuntu fans out there. The latest version of Ubuntu, 20.10 codenamed "Groovy Gorilla," is currently available in the beta version. I have tested out the distro myself, and it is stable enough to take out for a spin.

6 cool and fun Linux commands you don’t want to miss

The real purpose of this article is to help Linux newbies get comfortable and confident with the Linux command-line.  While knowledge and comfort of the Linux GUI allow great power, it is the mastery of the command line, or CLI, affords the Linux user unlimited power and certifies them as a Linux power user well on their way to becoming an expert.

10 ways to use the Chown command with examples

Any file in a Linux system belongs to a particular owner(s) and a group. It is one of the many features that maintain security in Linux systems. For example; If a file belongs to say UserA, then UserB cannot manipulate the data depending on any additional permissions set unless the user has permission to do that.

The 10 Best Linux Server Distros For Home And Businesses

By the year 2020, it is estimated that there are close to 600 Linux distributions in the market. It includes both servers and Desktop versions; therefore, if you are looking for lightweight Linux distribution for your old PC or a reliable desktop version for employees in your organization, you may be overwhelmed with the number of choices for finding one for your use.

CentOS Vs. Ubuntu Server : Everything You Need to Know

Choosing the perfect Linux distribution to set up your server can be confusing since Linux provides a limitless number of options. The main reason behind these many distributions is because Linux is an opensource platform. Anybody with the required skills can contribute to the development or build and release their distribution. Currently, there are more than 600 Linux Desktop and Server distributions in the market.