0% found this document useful (0 votes)
3K views8 pages

OS Lab Report

This document provides an introduction to basic Linux commands. It explains that Linux is an open-source operating system based on the Linux kernel. It then lists and describes 14 common Linux commands including pwd, cd, ls, cat, cp, mv, mkdir, rm, touch, ping, history, sudo, alias, and clear. The commands are used to navigate directories, view files, copy/move files, create directories and files, check connectivity, view command history, elevate permissions, create command aliases, and clear the terminal screen. The document concludes that it has provided an overview of basic Linux commands for using the Linux terminal.

Uploaded by

Sulekha Mahato
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3K views8 pages

OS Lab Report

This document provides an introduction to basic Linux commands. It explains that Linux is an open-source operating system based on the Linux kernel. It then lists and describes 14 common Linux commands including pwd, cd, ls, cat, cp, mv, mkdir, rm, touch, ping, history, sudo, alias, and clear. The commands are used to navigate directories, view files, copy/move files, create directories and files, check connectivity, view command history, elevate permissions, create command aliases, and clear the terminal screen. The document concludes that it has provided an overview of basic Linux commands for using the Linux terminal.

Uploaded by

Sulekha Mahato
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

Title: Introduction to Linux Commands.

Objective: Learn to command Linux in Linux terminal.

Theory: Linux is a community of open-source Unix like operating systems that are based on
the Linux Kernel. It was initially released by Linus Torvalds on September 17, 1991. It is a free
and opensource operating system and the source code can be modified and distributed to
anyone commercially or noncommercially under the GNU General Public License. Initially, Linux
was created for personal computers and gradually it was used in other machines like servers,
mainframe computers, supercomputers, etc. Nowadays, Linux is also used in embedded
systems like routers, automation controls, televisions, digital video recorders, video game
consoles, smartwatches, etc.
Following are some basic Linux Commands:
1. pwd command:
Use the pwd command to find out the path of the current working directory.
Syntax: pwd

2. cd command:
To navigate through the Linux files and directories, use the cd command. It requires
either the full path or the name of the directory, depending on the current working
directory that you’re in.
Syntax: cd filename/
3. ls command:
The ls command is used to view the contents of a directory. By default, this command
will display the contents of your current working directory. If you want to see the
content of other directories, type ls and then the directory’s path.
For example, enter ls /home/username/Documents to view the content of Documents.
Syntax:
ls -R will list all the files in the sub-directories as well
ls -a will show the hidden files
ls -al will list the files and directories with detailed information like the permissions, size,
owner, etc.
4. cat command
cat (short for concatenate) is one of the most frequently used commands in Linux. It is
used to list the contents of a file on the standard output (sdout). To run this command,
type cat followed by the file’s name and its extension.
Syntax: Cat > filename.txt

5. cp command
Use the cp command to copy files from the current directory to a different directory.
Syntax: cp file.txt /home/username/Documents.

6. mv command
The primary use of the mv command is to move files, although it can also be used to
rename files. The arguments in mv are similar to the cp command. You need to type mv,
the file’s name, and the destination’s directory.
Syntax: mv junu.txt /home/username/Documents.

7. mkdir command
Use mkdir command to make a new directory — if you type mkdir Movie it will create a
directory called Movie.
Syntax: mkdir Movie

8. rm command
The rm command is used to delete directories or files.
Syntax: rm filename

9. touch command
The touch command allows you to create a blank new file through the Linux command
line. Syntax: touch filename.txt

10. ping command


Use the ping command to check your connectivity status to a server.
Syntax: ping google.com

11. history command


When you’ve been using Linux for a certain period of time, you’ll quickly notice that you
can run hundreds of commands every day. As such, running history command is
particularly useful if you want to review the commands you’ve entered before.
Syntax: history

12. sudo command


Short for “SuperUser Do”, this command enables you to perform tasks that require
administrative or root permissions.
Syntax: sudo apt install neofetch

13. Alias Command


The command Alias is an amazing way to personalize and organize all your commands. It
allows users to designate a name to a single command or even a string of commands. So
programmers can give a short name before executing it.
Syntax: alias cls=clear

14. Clear
It is used to clear terminal screen.
Syntax: clear

Conclusion:
Hence we learned basic Linux commands using Linux terminal.

You might also like