Basic Linux commands

ยท

2 min read

What is Linux?

It is a lightweight and single-rooted operating system whose source code is free. Files are kept within the tree structure directory. It has multiple flavors like Cent OS, Ubuntu, Fedora, Redhat, Debian etc.91 percent of applications are running over the internet on Linux. It is also more secure than Windows OS.

Basic command on Linux

๐Ÿ‘‰ whoami >> to check the current user

๐Ÿ‘‰ ls >> to check files and directories

๐Ÿ‘‰ls -l >> to check the list of files and directories with more details

๐Ÿ‘‰ls -a >> to check all hidden files and directories

๐Ÿ‘‰date >> to check the current date

๐Ÿ‘‰touch >> to create a new file

๐Ÿ‘‰mkdir >> to create a new directory

๐Ÿ‘‰pwd >> to check the current path

๐Ÿ‘‰cd .. >> to go previous directory

๐Ÿ‘‰cd ~ >> to change home directory

๐Ÿ‘‰cd .. /.. >> to go back two directories

๐Ÿ‘‰cd home.ubuntu/my_folder >> to go destination directory

๐Ÿ‘‰echo>> to print something

๐Ÿ‘‰cat >> to write/see content in the particular file

๐Ÿ‘‰rm -r/-rf >> to delete files and directory

๐Ÿ‘‰mv >> to rename and move the file from one directory to another directory

๐Ÿ‘‰cp >> to copy files to one directory

๐Ÿ‘‰man any executable command >> can see detail description of that command

๐Ÿ‘‰adduser \>> to create a new user account

๐Ÿ‘‰userdel -r \>> to delete user account

1. Check your present working directory.

2. List all the files or directories including hidden files.

3. Create a nested directory A/B/C/D/

ย