Professional Documents
Culture Documents
Manual of The Experiment 1.3
Manual of The Experiment 1.3
CO Mapping:
CO2: Analyse File directory Hierarchy and apply their commands on Linux terminal for file
and directory manipulation.
Welcome to the next practical series of Linux Administration Lab. In this practical we are
going to start with beginners commands, the commands that we can use for general purposes.
I hope you all are installed with the Linux operating system. The main mode of access to a
Linux machine is through a terminal. For each terminal connected to a computer, the kernel
runs a process called a tty that accepts input from the terminal.
Every Linux system has a main console that is connected directly to the machine. The
console is a special type of terminal that is recognized when the system is started. And the
console is that where we can pass the commands to operate the Linux system is Terminal.
The easiest way with which you can open terminal by taking following steps:
So, before proceeding to commands let’s first learn to write a command in the terminal:
Where,
Command name is the name of the program you want the shell to execute. Commands are
case sensitive.
Option usually indicated by a dash (-), that allows you to alter the behaviour of the command
Arguments are the names of the files, directories or programs that command needs to access.
Note: [ ] brackets signify that they are optional part and can be used as per requirement Next
• who: Linux maintains the account of all the users of the system. This command displays
whole information about all the users that have logged into the system.
Syntax: who
Output: user pts/0 2:36
• whoami: Linux identifies the invoking user and lists the user name, terminal line and the
date and time of login.
• echo: It is an external command that is used to display each and everything we write.
• cal: The cal command is used to display the calendar for the current year if no argument is
passed.
Syntax: $cal
Output:
• date: The date command is used to display current date and time. Date is displayed in the
format day-month-year.
Syntax: $history
Output:
• uname: It prints the name, version and other details about the current machine and the
operating system running on it.
Syntax: $info
Output:
•
• help: Inputting the help command will show you all brief information about the command
you are using.
Example: $cal -h
Output:
• clear: The clear command does exactly what it says. The clear command clears the screen
and wipes the board clean. To use the clear command simply type clear.
• ls: It is used to display the listing of files and directories in current directory Syntax: $ls
Output:
• cat: It is used for various tasks, Here we will use it for creation of a file
• gedit: It is a graphical user interface editor with which file can be create
• touch: It is used for creating blank file for storing content. Syntax: $touch filename
Output:
• pwd: It stands for Print Working Directory. It tells us about our current location Syntax:
$pwd Output:
• mkdir: It stands for Make Directory. Used to make a directory in the current directory.
• cd: It stands for Change Directory. IT is used for shifting directory from one to another.
• rmdir: It stands for Remove Directory. As its name suggests, it is used for deleting a
directory.
• mv: This command is used for moving the contents of file or directory from one place to
another.
Syntax: $mv sourcename destinationname
Output:
References:
1. https://www.howtogeek.com/140679/beginner-geek-how-to-start-using-the-linux-terminal/
2. https://www.linuxforfreshers.com/p/vi-editor-vi-stands-for-visual.html