0% found this document useful (0 votes)
15 views4 pages

Lab 1

os

Uploaded by

Belete Siyum
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views4 pages

Lab 1

os

Uploaded by

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

Basic Linux Commands

► The commands are executed on the Linux terminal.


► The terminal is a command-line interface to interact with
the system, which is similar to CMD in the Windows OS.
► Commands in Linux are case-sensitive.
► Linux terminal is a user-friendly terminal as it provides
various support options.
► To open the Linux terminal, press "CTRL + ALT + T"
keys together, and execute a command by pressing the
'ENTER' key.
Basic Linux Commands (Cont’d)
Linux Directory Commands
► pwd: used to display the location of the current working
directory.
o Syntax: pwd

► mkdir: used to create a new directory under any directory.

o Syntax: mkdir <directory name>

► rmdir Command: used to delete a directory.

o Syntax: rmdir <directory name>

► ls: used to display a list of content of a directory..

o Syntax: ls
Basic Linux Commands (Cont’d)
► cd: used to change the current directory.
o Syntax: cd <directory name>

File commands
►touch: used to create empty files. We can create multiple empty
files by executing it once.
o Syntax: touch <file1> <file2> ....

► cat: It 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]…
To create a file
► For example: Press "CTRL+ D" keys to
cat > <file name>
save the file.
// Enter file content
Basic Linux Commands (Cont’d)
To display the content of the file
cat <file name>
►rm : used to remove a file.

Syntax: rm <file name>


►cp: used to copy a file or directory.
► To copy in the same directory:

cp <existing file name> <new file name>


► mv : to move a file or a directory form one location to
another location.
mv <file name> <directory path>

You might also like