Skip to content

Dhanaalakshmi/Ex-01-Linux-Commands

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 

Repository files navigation

Ex-01-Linux-Commands

NAME: DHANA LAKSHMI A

REG NO: 212223040033

Aim:

To study the execution of various Linux operating system commands.

Linux:

Linux is an open-source operating system. The kernel is the heart of Linux OS which

helps the communication between hardware and software. The main advantage of Linux was that programmers can use Linux kernel to design their own custom OS.

Linux Commands: All basic and advanced tasks can be done by executing commands. The commands are executed on Linux terminal. Linux commands are case sensitive.

Commands:

1) ls Command

The ls command is used to display a list of content of a directory.

Syntax: ls

image

2) pwd Command

The pwd command is used to display the location of the current working directory.

Syntax: pwd

image

3) mkdir Command

The mkdir command is used to create a new directory under any directory.

Syntax: mkdir

image

4) rmdir Command

The rmdir command is used to delete a directory.

Syntax: rmdir

image

5) cd Command

The cd command is used to change the current directory.

Syntax: cd

image

6) cat Command

The cat command is a multi-purpose utility in the Linux system. It can be used to create a file, display content of the file, copy the content of one file to another file, and more.

Syntax: cat [OPTION]... [FILE]..

image

7) cp Command

The cp command is used to copy a file or directory.

Syntax: cp

image

8) gedit Command

The gedit is a general-purpose text editor. It can be used to create and edit all kinds of text files.

Syntax: gedit file_name

image

9) su Command

The su command provides administrative access to another user. In other words, it allows access of the Linux shell to another user.

Syntax: su

image

10) mv Command

The mv command is used to move a file or a directory form one location to another location.

Syntax: mv

11) rename Command

The rename command is used to rename files. It is useful for renaming a large group of files.

Syntax: rename 's/old-name/new-name/' files

image

12) head Command

The head command is used to display the content of a file. It displays the first 10 lines of a file.

Syntax: head

image

13) tail Command

The tail command is similar to the head command. The difference between both commands is that it displays the last ten lines of the file content. It is useful for reading the error message.

Syntax: tail

image

14) id Command

The id command is used to display the user ID (UID) and group ID (GID).

Syntax: id

image

15) grep Command

The grep is the most powerful and used filter in a Linux system. The 'grep' stands for "global regular expression print." It is useful for searching the content from a file. Generally, it is used with the pipe.

Syntax: command | grep

image

16) tr Command

The tr command is used to translate the file content like from lower case to upper case.

Syntax: command | tr <'old'> <'new'>

image

17) chmod Command

The chmod command is used to change the access mode of a file (i.e., read, write or execute)

Syntax: chmod<file_name>

image

18) tar Command

The tar command is used for creating Archieve and extracting the archieve files.

Syntax: tar[options][archieve-file] [file to be archieved] $ tar xvzf file.tar *.c

image

19) chown Command

The chown command is used to change ownership.

Syntax: chown owner_name file_name

image

20) make Command

The make command is used for building and maintaining group of program.

Syntax: make [-f makefile][options]…….[targets]….

image

21) ifconfig Command

The ifconfig command is used to configure kernel-resident network interface.

Syntax: ifconfig[options][interface]

image

22) chmod 777 Command

The chmod 777 command gives read, write and execute permission to the owner, group and public.

Syntax: chmod 777 file_name $chmod -R 777 /path/to/file/or/folder

image

23) host Command

The host command is used to display the IP address for a given domain name and vice versa. It performs the DNS lookups for the DNS Query.

Syntax: host or

image

24) gzip Command

The gzip command is used to truncate the file size. It is a compressing tool. It replaces the original file by the compressed file having '.gz' extension.

Syntax: gzip ..

image

25) sort Command

The sort command is used to sort files in alphabetical order.

Syntax:sort

image

26) cal Command

The cal command is used to display the current month's calendar with the current date highlighted.

Syntax: cal

image

27) clear Command

Linux clear command is used to clear the terminal screen.

Syntax: clear

image

28) mail Command

The mail command is used to send emails from the command line.

Syntax: mail -s "Subject"

image

29) df Command

The df command is used to display the disk space used in the file system. It displays the output as in the number of used blocks, available blocks, and the mounted directory.

Syntax: df

image

30) find Command

The find command is used to find a particular file within a directory.

Syntax: find.-name”*.pdf”

image

Result:

Thus, the execution of various Linux commands is executed successfully using Ubuntu OS.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published