LINUX Commands


Update the kali with complete Distribution upgrade:

  • sudo apt update
  • sudo apt upgrade
  • sudo apt full-upgrade -y
  • sudo apt dist-upgrade -y

Same on windows equivalent

  • PS C:\Users> winget.exe upgrade --all --include-unknown

How to Get Hostname and version of Linux

  • hostnamectl
  • lsb_release -a
  • cat /etc/os-release

Run without Admin Access

  • Create - run.bat, then below lines
  • Set_COMPAT_LAYER=RunAsInvoker
  • Start Chrome.exe

external IP address

  • $ curl

Search the commands in History 

  • use CTRL + R and typing

Mount A network Drive 

  • sudo mount -t cifs // /mnt/nwgnas


Reference :

  •  nmcli general                                                
  •  nmcli connection show
    • NAME                UUID                                  TYPE      DEVICE  
  • sudo systemctl restart NetworkManager
  • nmcli radio wifi off  
  • nmcli radio wifi on
  •  nmcli device wifi list
Connect to a password-protected wifi network
  • $ nmcli device wifi connect "$SSID" password "$PASSWORD"


GREP command

Nmap : using Grep to filter IP addresses
Syntax : cat ip.txt | grep "text to search" | cut -d"" -f 2 | sort | uniq

cat ip.txt | grep -e "Status: Up"    

Installing deb package  

sudo dpkg -i *.deb

Load the wl module:

sudo modprobe wl

Updating snap store in Ubuntu 

sudo snap refresh snap-store

Enable write permission on HFS+ HDD on Ubuntu

sudo df
sudo blkid

sudo fdisk -l

 sudo apt install hfsprogs 
 sudo chown -R $USER:$USER /media/gouti/HDD_MAC
$ sudo umount /dev/sdb2
$ sudo mount -t hfsplus -o rw,force /dev/sdb2 /mnt/HDDmac/

Search a command to install from CLI:

:~ $ apt search hwinfo
Sorting... Done                                                                                                                    
Full Text Search... Done                                                                                                          
backupninja/oldstable,oldstable 1.2.1-1 all                                                                                        
  lightweight, extensible meta-backup system                                                                                      
forensics-extra/oldstable,oldstable 2.29 all                                                                                      
  Forensics Environment - extra console components (metapackage)                                                                  
hwinfo/oldstable 21.72-1 arm64                                                                                                    
  Hardware identification system                                                                                                  
libhd-dev/oldstable 21.72-1 arm64
  Hardware identification system library and headers

libhd-doc/oldstable,oldstable 21.72-1 all
  Hardware identification system library documentation

libhd21/oldstable 21.72-1 arm64
  Hardware identification system library

:~ $ sudo apt install hwinfo


MacBook pro 2012 : Ubuntu boot Error: uninstall kernel when  kernel panic not syncing:

While Booting press options key  
Advance Ubuntu
select lower version kernel - login then perform the following commands to uninstall the kernel which causes problem

Now use the below GUI to uninstall:

Method 1: Installing Latest Mainline Kernel on Ubuntu via GUI
sudo add-apt-repository ppa:cappelikan/ppa
sudo apt update && sudo apt upgrade -y
sudo apt install -y mainline

If the GUI is not able to uninstall, get the error message as dependences and paste them as below to remove manually 

sudo apt remove linux-headers-6.5.0-27-generic linux-image-6.5.0-27-generic linux-modules-extra-6.5.0-27-generic  linux-modules-6.5.0-27-generic

Then use autoremove purge to remove residues 
sudo apt autoremove --purge 
sudo apt update 
sudo apt upgrade -y

sudo apt install iptraf-ng
iptraf-ng -i eth0
iptraf-ng -i wlan0
Remote desktop Ubuntu machine  using Remmina

on the client machine Enable the sharing option
then enable the VNC, the click on the hamburger menu and select use password.


Popular Posts


Chennai :MTC complaint cell Customer Care No.:+91-9445030516 /Toll Free : 18005991500

Privacy Settings for windows