/**/ 5 Basic Linux Commands for Beginners - Dextutor Linux

5 Basic Linux Commands for Beginners

So, now that you know how to get to command line the next step is to start using it. We will discuss 5 basic Linux commands for beginners.

Understanding the General Command Syntax

Any command will have the following syntax

command options arguments

command: refers to the command name. For example, ls, pwd, date, chmod etc

$ls

options: are used to adjust the behaviour of a command

$ls -l

arguments: specify additional arguments like file name

$ls -l linux.c

Next, we focus on 5 basic Linux commands for beginners to start with

Now, once you are in the command mode you probably do not know where you are? What I mean by this is that if you are using the GUI you know exactly in which directory/folder you are working. So, the first thing you must know is the current working directory. Whatever happens by default happens in the user’s working directory.

1. pwd – print working directory

pwd command prints the working directory. It is one of the important things you know because whenever you create/delete new files/directories you must know where you are doing it. For example:

5 basic linux commands for beginner. pwd

In this case the working directory is /home/baljit.

2. cal – calendar

cal command prints the calendar. By default it prints the current month. For example:

using cal command in Linux

3. date – system date and time

date command prints the current system date and time

using date command in linux

For more details on date command click here

4. ls – list directory contents

ls command lists the contents of a directory. Some examples of using ls command are shown below

$ls
$ls -l
$ls -l abc.txt

For details on ls command click here

5. history – displays list of previously executed commands

history command displays list of previously executed commands prefixed with command number. This is helpful when you want to see the recent commands that you have executed.

$history
how to use history command in Linux

You can also use ! sign along with the command number to re-execute the command. For example

$history !9

will rerun the ls command

2 thoughts on “5 Basic Linux Commands for Beginners”

Leave a Comment