0% found this document useful (0 votes)
9 views

0c Linux Basic Commands

The document discusses how to create and edit files using vi including touching a file, opening a file in vi, writing to a file in insert mode, closing without saving using :q!, saving and closing using :wq!, navigating directories using cd, listing directory contents with ls, creating directories with mkdir, and checking the current directory with pwd.

Uploaded by

Subbu Shaik
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

0c Linux Basic Commands

The document discusses how to create and edit files using vi including touching a file, opening a file in vi, writing to a file in insert mode, closing without saving using :q!, saving and closing using :wq!, navigating directories using cd, listing directory contents with ls, creating directories with mkdir, and checking the current directory with pwd.

Uploaded by

Subbu Shaik
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

1.How to create a file?

touch abc.txt

2.How to open a file?

vi abc.txt

3.What are the two modes, when file is opened.

Read Mode and Insert Mode.

4.How to write something in the file

Get the file to Insert Mode and Write.

5.How to close without saving?

Get the file to Read Mode and type :q!

6.How to save and close?

Get the file to Read Mode and type :wq!

7.How to go to a particular directory?

cd DirectoryName

8.How to see the contents in the directory?

ls directoryName

9.How to create my own directory?

mkdir DirectoryName

10.Where am I?

Command: pwd

You might also like