What You Need To Know About Linux

olaniyi akinkunmi - Aug 20 - - Dev Community

Q1 How to quite a Vim file To quite a Vim file follow the steps below
1 press Escape key on your keyboard
2 press shift and:
3 type wq

Q2 How do you list the content of a directory????

there are two commands available to list the directory contents.
the general syntax of the ls command is as follow−

$ ls [OPTION]... [FILE]
To display the current directory content in the Linux/Unix system, we use the ls command as shown in below.
$ ls
Here, we will display the list contents of a directory in long listing format as well as the author of each file, date, and owner permission using -l option with the ls command in the Linux system.

Q3 What command can be use to delete the content of the directory
The rm command remove the entries for a specified Fil, group of file or certain select file from a list within a directory
To delete a single file, use the rm command followed by the file name:
rm filename
unlink filename

Q4 what command can be use to switch from a normal user to a root user??
To switch from a normal user to a root user in Linux, you can use the following commands:

1 sudo -i: This command will switch to the root user by prompting for the root password12.
2 su -: This command will switch to the root user by asking for the root password4.
3 su: This command can be used to switch to another user account, but only if you know their password

. . . . . . . . . . . . . . . .
Terabox Video Player