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.
Any command will have the following syntax
command options arguments
options: are used to adjust the behaviour of a command
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.
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:
In this case the working directory is /home/baljit.
cal command prints the calendar. By default it prints the current month. For example:
date command prints the current system date and time
For more details on date command click here
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
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.
You can also use ! sign along with the command number to re-execute the command. For example
will rerun the ls command