Code Monkey home page Code Monkey logo

ex-01-linux-commands's Introduction

Ex-01-Linux-Commands

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

ex1_01

2) pwd Command

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

Syntax: pwd

ex01_02

3) mkdir Command

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

Syntax: mkdir

ex01_03

4) rmdir Command

The rmdir command is used to delete a directory.

Syntax: rmdir

ex01_04

5) cd Command

The cd command is used to change the current directory.

Syntax: cd

ex01_05

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]..

ex01_06

7) cp Command

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

Syntax: cp

ex01_07

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

ex01_08

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

ex01_09

10) mv Command

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

Syntax: mv

ex01_10

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

ex01_11

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

ex01_12

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

ex01_13

14) id Command

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

Syntax: id

ex01_14

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

ex01_15

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'>

ex01_16

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>

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

19) chown Command

The chown command is used to change ownership.

Syntax: chown owner_name file_name

ex01_19

20) make Command

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

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

ex01_20

21) ifconfig Command

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

Syntax: ifconfig[options][interface]

ex01_21

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

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

ex01_23

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 ..

ex01_24

25) sort Command

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

Syntax:sort

ex01_25

26) cal Command

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

Syntax: cal

ex01_26

27) clear Command

Linux clear command is used to clear the terminal screen.

Syntax: clear

ex01_27

28) mail Command

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

Syntax: mail -s "Subject"

ex01_28

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

ex01_29

30) find Command

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

Syntax: find.-name”*.pdf”

Result:

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

ex-01-linux-commands's People

Contributors

drmalathisaravanan avatar balureddyvelayudhamgowtham avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.