How to get wifi password

Question : how to get friends wifi password using command ?

Question : hack wifi password using command ?


Step 1


Windows Key + R



Step 2

Open Command Prompt just Type  " cmd "  and hit the enter ( Logon as a Administrator )

 Step 3

Type command :

 netsh wlan show profiles 




Netsh - Command
Wlan  - wireless card
show profiles  - display all connected ssid of wireless

Here  connected wifi network " Iris_4G "

Step 4

We use "Iris_4G"  on blow command

netsh wlan show profiles Iris_4G



Scroll All Information about network

Step 5

Final command

netsh wlan show profiles Iris_4G key=clar


Now Scroll  and  find   Key Content in Security Setting 

Your password key is  [email protected]






how to enable hibernate button in window 7 on start bar

Question : how to enable hibernate button in  window 7 ?

Question : what is hibernate ?

Hibernate is a option to keeps your work and settings in memory. it's also responsible to open your documents and programs on your hard disk, and then turns off your computer.
Step 1

Click on Start and type on search area " power option "

Step 2

Click on Power Option



Step 3

Change when the computer sleeps


Step 4

Change Advance power setting

Step 5

Sleep

Allow Hybrid Sleep

         Setting : on  (  Select Off )


After Change



Apply / OK and exit







Enable hibernate option in window 10

Question : what is hibernate ?

Question : how to enable a hibernate option in window 10 ?



hibernate is a option to keeps your work and settings in memory. it's also responsible to open your documents and programs on your hard disk, and then turns off your computer.

Step 1

Go to control panel 


Step 2  

Click Hardware & Sound


Step 3

Select Power Option


Step 4

Choose what the power button do


Step 5

Chang setting that are currently unavailable 


Step 6

Scroll down and see Shutdown Setting 



Step 7 - Check on Hibernate for Enable / Unchecked for Disable  and Press Save Change 





ping ss route netstat command

ping ss route netstat command


Useful command To Checking Connectivity of Network  -
  • ping
  • ss
  • netstat
  • route
  • tcmpdump
  • wireshark
  • munin
  • cacti
Ping - to use ping command for checking IP or host or network is reachable or not

Ex-  ping < network )
# ping  10.10.10.1 
SS - socket statistics  - to know all information about TCP/UDP Connection , Established Connection  , protocol , TCP socket etc.

# ss 

Option

-a = Display all info

-l = Display all open port/socket

-o = Show time info

-m = Show memory info

-p = Show process info

-i = Show internet TCP/IP information

-r = Resolve host name

-4 = Display only IPv4 socket

-6 = Display only IPv6 socket

Netstat - t o see the information about network connection , routing table , interface etc.

# netstat
Option

-t   = display all tcp connection

-u  = display all UDP connection

-r  = display all routing table

-s =  display networking statistics

-v = verbos mode

-l   = list all open socket

-a = all

-o = display time

route   =  to see the routing table  , add new route etc

# route
Option

-v, --verbose           be verbose

-n, --numeric          don t resolve names

-e, --extend            display other/more information

-F, --fib                  display Forwarding Information Base (default)

-C, --cache            display routing cache instead of FIB

To add default getaway

# route  add  default  gw  10.10.10.1
To set route for 2 different network

For example , we have 2 eth one is direct broadband connection establish by modem  & second eth1 we gave IP 10.10.10.100 & netmask 255.255.0.0 we do not give gateway

To add route command

#route  add  -net < network>  netmask <netmask>  gw <getaway>
Ex - # route  add  -net  10.10.20.0  netmask  255.255.0.0  gw 10.10.10.1 
Ex - # route  add  -net  10.10.30.0  netmask  255.255.0.0  gw 10.10.10.1 
To reject particular host/IP/Network

# route add -host  10.10.10.200  reject
Tcmpdump - is an command-line packet capture and analyzer tool for monitoring network traffic.

# yum install tcpdump
Command

# tcpdump
Specific interface

# tcpdump -i eth0
Display Available interface

# tcpdumb -D
Capture packet in ASCII Format

# tcpdump -A -i eth0
Capture packet in HEX & ASCII Format

# tcpdump -XX -i eth0
Capture packet & save in file : here *.pcap is file format

# tcpdump -w 0001.pcap -i eth1
Read capture packet file

# tcpdump -r 0001.pcap
Capture IP Address Packet

# tcpdump -n -i eth0
Capture TCP Packet

# tcpdump -i eth0 tcp
Capture packet form specific port

# tcpdump -i eth0 port 22
Capture packet form source IP

# tcpdump -i eth0 src 10.20.2.33
Capture packet form Destination IP

#tcpdump -i eth0 dst 10.20.2.126

Wireshark - is an open source network protocol analyzer that is used to troubleshoot network related issues.

# yum install wireshark*

Munin - is an web based network and system monitoring application that is used to display results in graphs using rrdtool.


hostname configuration in centos

Question : which file contains hostname in  Linux   ?

Question : how to configure host name in centos ?

Question : how to change hostname in linux ?

Step A

Change hostname temporary

# hostname < your hostname >

# hostname  linuxtopic.com

After the system

Step B

Change hostname permanently 
#Vi  /etc/sysconfig/network
#format

NETWORKING =yes

HOSTNAME=lokesh






network configuration in linux

Question : step by step network configuration in Linux ?

Question : step by step host configuration in centos ?

Question : how to configure a virtual network card in Linux ?

Question : step by step ip configuration in Linux ?

Question : how to disable and enable a LAN or Ethernet  card in Linux centos ?


Network Configuration

In the Network Configuration: we will configure HOSTNAME, IP Address, DNS , routing


Related configuration file


  • /etc/Resolve.conf
  • /etc/hosts
  • /etc/sysconfig/network
  • /etc/sysconfig/network-scripts/ifcfg-<device>
  • /etc/nsswitch.conf


1. resolve.conf -  its content a DNS record / List of DNS server

# vi  /etc/resolve.conf

It's responsible for  Primary , Secondary & thirty  dns record

#format

search local.lan

NameserverX.X.X.X
NameserverX.X.X.X






2 hosts -  it s content a host name , to be resolve by locally.

#Vi  /etc/hosts
#format

<IP Address> <hostname.domainname> <hostname>

10.20.2.33  khandwa.lokesh.com     khandwa



3  network  -  set hostname permanently & networking

#Vi  /etc/sysconfig/network
#format

NETWORKING =yes

HOSTNAME=lokesh





4 fcfg-<device> -  it s content IP address, h/w id etc,

# vi /etc/sysconfig/network-scripts/ifcfg-eth0
#format

DEVICE=eth0  -----------------Device: first  etharnet  called eth0

NM_CONTROLLED=no ----- Network Manager controlled 

HWADDR=00:1e:8c:9c:10:95 - hardware Address

ONBOOT=yes   ------------------ up on system reboot

TYPE=Ethernet  --------------  Ethernet 

USERCTL=no

IPV6INIT=no ---------------------- IP Address v6

IPADDR=10.20.2.33 ----------------  IP Address v4

NETMASK=255.255.255.0 ----------- Mask












GUI Command - set all network related configuration by following command, it s a graphical and easy  tool.
# system-config-network















Here you can set ip address & DNS configuration.

To Start network Service

# service network restart
To Stop network service

# service network restart
5 nsswitch.conf : list order of host name search. Typically lok at local files, then NIS server

IP Configuration by command line 

ifconfig:- it's used to configure, or view the configuration of, a network interface.  It stands for "interface configuration". It is used to view and change the configuration of the network interfaces on your system.
# ifconfig

To view all interface


# ifconfig -a
To view specific interface
# ifconfig eth0 
To enable  interface

# ifconfig  eth0 up
OR
#ifup eth0
To disable interface
# ifconfig eth0 down
OR
#ifdown eth0
Assign the IP address,netmask & broadcast , you can use  separate

# ifconfig <device> < IP Address> netmask <netmask> broadcast < Broadcast>
# ifconfig  eth0:2  10.20.2.35 netmask 255.255.255.0 broadcast 10.20.2.255
Here eth0.2 is virtual Ethernet card / alias of Ethernet card

To disable alias

# ifconfig  eth0:2 down
How to enable promiscuous Mode:

What happens in normal mode, when a packet received by a network card, it verifies that the packet belongs to itself. If not, it drops the packet normally, but in the promiscuous mode is used to accept all the packets that flow through the network card.
# ifconfig eth0 promisc
How to disable promiscuous Mode: add - for disable

# ifconfig eth0 -promisc
How to change MAC Address:

# ifconfig eth0 hw ether AA:BB:CC:DD:EE:FF

Create Virtual Network card: permanent

[[email protected] ~]# cd /etc/sysconfig/network-scripts/
[[email protected] network-scripts]# cp ifcfg-eth0 ifcfg-eth0.1
Open ifcfg-eth0:1 file and set ip address

Here ip - 10.20.2.34

Now restart network service

#service network restart




Linux installation step by step

Question : what is Linux ?

Question : how to install Linux and installation  requirement ?

Question : What is Linux feature ?

Question : Linux File System ?

Linux


Linux is a Unix-like operating system that was designed to provide personal computer users a free or very low-cost operating system comparable to traditional and usually more expensive Unix systems. Linux has a reputation as a very efficient and fast-performing system. Linux's kernel was developed by Linus Torvalds at the University of Helsinki in Finland.

Linux File System





  System Requirement 

  • CPU : Pentium 3 to higher 
  • RAM : 256 MB to Higher
  • HDD : 1 GB to Higher
  • Media : Bootable CD/DVD
step 1 

Boot form media CD/DVD

Option :
  • Install or Upgrade  existing system : Fresh or upgrade
  • Install system with basic video driver : install with video driver
  • Rescue install system : for troubleshooting / repair / password reset and more
  • Boot from local drive : skip installation and boot from HDD 

Select option 1 for install CentOS

Step 2

Test Media 

To be testing  media before installation ,Press OK or Skip



Step 3 :

Welcome to Installation : Press Next



Step 4 

Select your  Language  and press Next : English  


Step 5 

Select Keyboard and press Next : U.S English


Step 6 

Select Storage type and press Next


Step 7

Type your hostname and press next : linuxtopic 


Step 8

Select your Time Zone :  Asia/Kolkata


Step 9 

Set Root Password


Step 10

Partition :

Use All Space :

Replace Existing Linux System :

Shrink Current System :

Use Free Space :

Create Custom Layout :



I have 8 GB of HDD, I select Custom Layout :

first  partition :  /boot   :  200 MB - force primary ( sufficient 200 MB  ) 

               1  - Press Create  

               2 - Create Partition :
                       
                    Create RAID

                    Create LVM
             

                    3 Add Partition 
                             Mount Point 
                             File System Type
                             Size

           
second partition : follow /boot step , only select file system type " swap "

Swap  : just double of Ram

third partition : follow /boot step

/  ( root ) : fill all space


Step 11

Install Boot Loader and Next



Step 12

Installation Type :  Minimal 

Note : you can choose as per the your requirement , 

Just wait , time depend on  installation type 



Step 13

Reboot : Installation Done 



  

Clear Squid Cache And re-create Cache Directories

Question : how to clear squid cache directory ?

Step 1

Find Squid cache directory location

# grep cache_dir /etc/squid/squid.conf

Step 2

Restart Squid with an empty cache
# squid -k shutdown
Step 3

Delete the  Cache directory by following command 
# rm -rf  < your cache dir path >
# rm -rf /var/spool/squid/
Step 4

Now Create Directory 

# mkdir /var/spool/squid
Step 5 

Set Permission

# chown squid:squid /var/spool/squid

SELinux user : command

# restorecon -vr /var/spool/squid

Step 6

Re-create the cache directories
# squid -z

Step 7 
# service squid restart