DEV Community

Cover image for What You Need To Know About Linux
olaniyi akinkunmi
olaniyi akinkunmi

Posted on

What You Need To Know About Linux

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

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

Top comments (0)

nextjs tutorial video

Youtube Tutorial Series 📺

So you built a Next.js app, but you need a clear view of the entire operation flow to be able to identify performance bottlenecks before you launch. But how do you get started? Get the essentials on tracing for Next.js from @nikolovlazar in this video series 👀

Watch the Youtube series

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay