Posts

Showing posts from June, 2021

ls command

Image
About ls command full form = list  With the help of ls command, list the contents present inside the directory.  Command: ls [OPTION] [FILE_PATH] Note: Default value of FILE_PATH is current working directory. Some useful options with examples are given below - 1. ls  :  Lists files and directories present inside a directory with no options. 2. ls -a (or ls --all):  Some files are hidden inside the directory, they are called hidden files. In such a situation, with the help of  -a(--all) option, you can list all types of files whether hidden or not. OR   When we ran ls command then .f.txt , .k.txt files and .game directory were not display but with the help of -a( --all)  option all files are display. 3. ls -l :  With the help of this command, the files present inside the directory can be displayed in long format.   Several columns are visible here, the first character of the first column indicates the type of file. The file types are shown below:- d : directory  -  : ordinary file l 

ifconfig command

Image
Ifconfig command :-  Whenever we connect one computer to another computer or other device, then we need IP address. And every computer has a network interface card and we assign IP address to this card.  With the help of this command, it is used to give IP address and netmask to the network interface and enable or disable the network interface, so let us see how to do all this. What is enabling or disabling a network interface?  Allowing the data to be received over the network or sent over the network is called enabling interface, on the contrary, the process is called disabling. Syntax:  ifconfig  [options]  [interface] 1. How to view network interface card information ? Syntax: $ifconfig  -a With the help of -a (--all) option, ifconfig displays all network interfaces whether enabled or disabled. In the picture you can see that there are three network interfaces eth0,lo and wlan0.  Above red line in wlan0 is written UP in flags=4163<UP, BROADCAST, RUNNING, MULTICAST> it means i

cd command

Image
To move from current working directory to another directory, use this command. Syntax: cd [option]  DIR_NAME / DIR_PATH Some use of this command is as follows. 1. cd  DIR_NAME : Useful to go to the directory present inside the directory  Example:- The directory named king is our current working directory, many sub directories and files are present inside this directory. If we want to go to the directory named android  then we will use cd android command. 2. cd  ABSLUTE_PATH :- To go to a directory, you can go to that directory with the help of the absolute path of that directory.  The absolute path of a directory relative to the root directory is called.  example :- You can  go from king directory to android directory with the help of absolute path.  $ cd   /home/king/android  3. cd  RELATIVE_PATH :- If you want to go from current working directory to any other directory then path of destination directory with respect to current working directory is called relative path of destination