Saturday , May 28 2022

Basic Linux Command

In today’s article I will give information about Basic Linux Command.

Cd : You can enter the specified folder with the cd command and you can go to the home directory of the user you are connected to from the directory you are connected to by simply typing cd.

After the cd command, you write the folder you want to go to. Below we go into the /var/log/ directory.

Pwd: With this command, you can see which directory it is in. With the above command /var/log/

We entered the directory. We verify that we are in that directory by typing pwd.

As seen above, we saw that we were in that directory.

Mkdir : We can create files with the help of this command. Example usage is as follows.

With the help of the above command, we created a file named linuxogreniyorum.

We have created a file, but how do we see this file?

ls: Allows you to see the files in the directory you are in.

With the mkdir command above, we have created a file named linuxogranny in the directory we are in, and we list it with the ls command.

As seen above, we see that our file has been created.

Vi : vi is the text editor. On the Windows side, you can think of it like “New Text Document.txt”. With the help of this editor, you can view, change and delete existing text files, or you can use the vi command to create a new text file.

First of all, I want to create a text file named textfile in the directory I am in.

The file named textfile above has been created temporarily. You can open the insert mode by pressing the ” ” key and write in it and after pressing the “ESC ” key after typing, “:wq!” We can save and exit with . To exit without saving “:q!” you can use.

 

 

 

 

Faruk Erdem
Author: Faruk Erdem

About Faruk Erdem

Leave a Reply

Your email address will not be published. Required fields are marked *