Walk into Linux....😄

Linux Basics….

Hey there.!!, Good Day.!!, in this page you will get some Linux basic commands for day-to-day activities.

About Linux.!!!

Linux is a case sensitive one, so whatever command that your are going to give please make sure whether it’s in upper or lower case.

 

- - - - - - - - - - - - - - - G E N E R A L S - - - - - - - - - - - - - - - -

/       

This slash indicates the root of the file system; it means the root     directory contains system files and user profile.

/root

This the basic directory for all users profile.

/boot  

This boot directory contains kernel image for the linux to kick start the system, in later part we will see about kernel image. In simple words the kernel is a core for the operating system in a computer.

/etc    

This etc directory contains linux configuration files. Basically, it contains system configuration files.

/mnt

This is storage mounts in your system.

/media

This is USB Drives, CD Drives, SSD Detachable Drives.

/bin

This contains binary files, these files are executable files, EG: in windows .bat files executable ones.

/lib

This contains shared program libraries like DDL.

 

 

 

- - - - - - - - - - - - - - C O M M A N D S - - - - - - - - - - - - - - - -

pwd

This command is called Present working directory this will shows which directory that you are working currently.

whoami

This command will help to find out the username who is currently working. Like it shows the username. If you take sudo access of multiple id and working parallelly on that time it will help’s more.

cd

This is called change directory, if you want to go to another directory use this command and type for eg: cd folder1, this will open the directory on the present location, like opening the folder. If you type cd /fold, this means (/) indicates root, so it goes to root and search for the folder called fold and opens it.

ls

This is called list, this has so many features like if you want to view the files in the directory enter ls to show the normal files, if you want to show that hidden files also, type ls -la this will show the hidden directory also. In upcoming posts, I will explain more on this…

cat

This command will help to read the files, in linux mostly the system config files were in text format so this command will help to read the files easily, also this command is used to edit the files or create an new file.

Ø  cat config.txt this will open the file and you can able to read easily.

 

Ø  cat >> config.txt if you want to add any new words inside the file use this command and after finished your typing, press ctrl+D this will helps to exit.

 

Ø  cat > config.txt this command will create an new file and after entering this command you need to type the input text inside the file and at last press ctrl+D.

 

Ø  NOTE: please practice the above commands for more understanding.

 

 

find

This find command will use to find the files it will give the location and matching files also it will be listed

The command is find / -type f --name name.txt

So the above command is use to find the name.txt file in the root level, if you want for an specific folder please mention instead of  '/’ use  /your_directory this will find only on the particular directory.

 

wildcards -> so this wild cards will be added to the search for find the file with max efficiency the wild cards like [a,b] or *at

Eg: find / -type f –-name [d]ocs.* will give files start with D and with all extension.

There is a concept called ‘Grep’ commands, this will be added to the command one by one with de-limiter symbol


Comments