Thursday, June 12, 2025

Friday, July 22, 2022

How to Install rpi-imager in Ubuntu 20.04

 

 

Open a Terminal

$ sudo apt update

$sudo snap install rpi-imager


or


$ wget https://downloads.raspberrypi.org/imager/imager_latest_amd64.deb

$ sudo apt install ./imager_latest_amd64.deb

Tuesday, March 9, 2021

How to check the failed login history of your linux server

 lastb command is used to check the failed login history in Linux.


usage   :

$ sudo lastb



Thursday, January 28, 2021

How to make pdf file from multiple Image files in Ubuntu

 

If you have multiple image files and you want to make a single pdf file from it, just follow the steps

This GUI tool convert multiple image files to a single pdf file in Ubuntu linux


open terminal (Ctrl+Alt+T)

$ sudo apt install gscan2pdf


Friday, July 19, 2019

How to keep running a process after ending ssh session



ssh into your remote server.
start screen.


$ screen 

Start the process .

$ run any process

Then Press Ctrl-A then Ctrl-D. This will detach your screen session but leave your processes running.
You can now log out from the remote server.

When you like to come back to monitor your process, then log on again to the remote server  and type screen -r.
 This will resume your screen session,

You can Check your previous process.

Friday, November 3, 2017

Free Open Source Firewall Solution - Pfsense

PFSense is an open source firewall and router distribution based on FreeBSD .
 Pfsense is tailored for use as a firewall and router that is entirely managed via web interface.

pfSense can be setup on a lower end PC. It can be configured  and enhanced through a web-based interface, with out any  knowledge in FreeBSD system.

PfSense is very flexible and can easily be adapted to numerous applications ranging from a home router to a firewall for a large corporate network.  PfSense includes many features that are often only found in expensive commercial routers.



Why use pfSense instead of another router?

PfSense is fast, free, and stable offering tons of great features.

If you have an existing router that doesn't offer the features, or performance you need pfSense is a great choice to replace it with. Offering complete control of the hardware you can customize your pfSense system with the components you want.

If you've ever shopped for routers or firewall's before you probably know that depending on the features you are looking for they can be quite expensive. By using pfSense you can save a ton of money without compromising on features.


Popular uses for pfSense

    Firewall
    LAN / WAN Router
    Wireless Hotspot (Captive Portal)
    VPN Router
    DHCP / DNS Server
    Wireless Access Point
    Multi Wan Router
    Multi-WAN load balancing
    Automatic connection failover
    Bandwidth throttling 
    IPv4 and IPv6 support
    Port Forwarding / NAT (Network Address Translation)
  
User Authentication
    Local user and group database
    User and group-based privileges
    External RADIUS authentication
  
Proxy and Content Filtering
    Transparent Squid Proxy Server
    HTTP and HTTPS proxy
    Non Transparent or Transparent caching proxy
    Web Content Filter
    Domain/URL filtering
    Anti-virus filtering
    Unified Threat Management
    DNS Blacklist
    GeoIP blocking
    Anti-Spoofing
    Time based rules
    SafeSearch for search engines
    Website access reporting
    Usage reporting for daily, monthly, etc.

Dashboard with configurable widgets
Local logging
Remote logging
Local monitoring graphs
Real-time interface traffic graphs  and More.........................









Monday, October 23, 2017

AppImage : Portable package for Linux

AppImage : New package format for Linux


Debian/Ubuntu useing .deb packages,  Redhat, Fedora Using .rpm Packages. Now a days you can see a new package format .appimage

AppImage is a Universal package format  that runs in all the Linux Distributions.


It is very easy to use , because there is no dependency issues.

A typical linux installation create files in various places so it requires root permission for installation.

but in appimage  doesn't need root privilege because it  doesn’t really install the software.

How to use appimage

  just download , make executable(right click on file --> select properties--> permissions and click on execute) and  run


Lot of Appimages are avilable here 



Tuesday, September 26, 2017

How to Install ESP32 Board in Arduino IDE ( Ubuntu /Debian )

How to Install  ESP32 Board in Arduino IDE ( Ubuntu /Debian )

Now a days ESP32 become more popular than NodeMCU.

ESP32 board is not available in Arduino IDE.

For Adding ESP32 Board in Arduino IDE

First you have to install the latest Arduino IDE from arduino.cc

Run the following commands in a terminal

sudo usermod -a -G dialout $USER && \
sudo apt-get install git && \
wget https://bootstrap.pypa.io/get-pip.py && \
sudo python get-pip.py && \
sudo pip install pyserial 
 
 
 Now make a folder espressif in your arduino/hardware folder and change to that directory
 
 
 
 mkdir -p ~/Arduino/hardware/espressif 
cd ~/Arduino/hardware/espressif  
 
 
now run the following command
 
git clone https://github.com/espressif/arduino-esp32.git esp32 && \
cd esp32/tools/ && \
python get.py
 
 
Copy and paste the above all commands in a terminal. 
It will download and install all the required files and settings.


Restart Arduino IDE.


Thursday, September 21, 2017

How to Run 720p and 1080p mkv files Raspberry pi

VLC and other common video players  in Raspberry pi not support GPU.

You can use Omxplayer a text based video player for running 720p and 1080p mkv and almost all other video formats.

for installing omxplayer

sudo apt-get install omxplayer

omxplayer is a textbased player , so it is very difficult to use.

you can provide a graphical front end by using tboplayer

https://github.com/KenT2/tboplayer

Download the zip file from above site

run the following commands
sudo su
unzip tboplayer-master.zip
cd tboplayer-master
./setup.sh

This will take some time to complete

now run the following
python /opt/tboplayer/tboplayer.py

if any python module missing issue

pip install

Example:

raceback (most recent call last):
  File "/opt/tboplayer/tboplayer.py", line 65, in
    import pexpect
ImportError: No module named pexpect

Solution :  pip install pexpect






Tuesday, August 22, 2017

How to Install Edup Wifi Adapter in Ubuntu

How to Install Edup Wifi Adapter in Ubuntu

USB ID  148f:7601 Ralink Technology, Corp.

Chip :  Ralink MT7601u

Open a Terminal and Run the following commands

sudo apt-get install linux-headers-generic build-essential 

sudo apt-get install git

git clone https://github.com/art567/mt7601usta.git 

cd mt7601usta/src 

make 

sudo make install 

sudo mkdir -p /etc/Wireless/RT2870STA/ 

sudo cp RT2870STA.dat /etc/Wireless/RT2870STA/ 

sudo modprobe mt7601Usta

 

Now Check your Wifi 

Monday, July 24, 2017

How to cut a field from csv file using bash

How to cut a field from csv file using bash 

Example :
cat mycsv.csv | cut -d ',' -f3


cat mycsv.csv | cut -d "," -f3 | sort | uniq -c | sort -rn | head

 


Monday, May 15, 2017

How to Disable Ports 445, 139 and 3389 , Protect your system from wannacy attack

How to Disable Ports 445, 139 and 3389 , Protect your system from wannacy attack


 Run the following  command in cmd (run as administrator).


netsh advfirewall firewall add rule dir=in action=block protocol=TCP localport=135 name="Block_TCP-135"
 
netsh advfirewall firewall add rule dir=in action=block protocol=TCP localport=445 name="Block_TCP-445" 


netsh advfirewall firewall add rule dir=in action=block protocol=TCP localport=3389 name="Block_TCP-3389"
 
 
 

How to Disable SMB Service in Windows and Protect your system from wannacry virus

How to Disable  SMB Service in Windows and Protect your system from wannacry virus


How to Disable SMBv1 support

The wannacry vulnerability can  be closed by completely disabling SMBv1 support. Run the following  command in cmd (run as administrator).

dism /online /norestart /disable-feature /featurename:SMB1Protocol

This will permanently disable SMBv1


For enabling just change the disable-future to enable-future

Tuesday, March 14, 2017

How to Install GUI in Ubuntu Server

How to install GUI in Ubuntu Server

You can install the default Ubuntu desktop by executing the following:

sudo apt-get install ubuntu-desktop

There are many desktop alternatives which you may install and use, like:

    Gnome 3 installation: sudo apt-get install gnome-shell
    XFCE installation: sudo apt-get install xfce4
    LXDE installation: sudo apt-get install lxde

    KDE see Kubuntu installation: sudo apt-get install kubuntu-desktop
    Openbox installation: sudo apt-get install openbox
 
    Another good GUI : sudo apt-get install gnome-session-fallback

Monday, October 24, 2016

How to install Richo SP 111 Printer in Ubuntu


Install the following files

sudo apt-get install jbigkit-bin inotify-tools

 

Download the git files or clone form here https://github.com/madlynx/ricoh-sp100


Extract the zip file in a folder

Copy the following file

sudo cp pstoricohddst-gdi /usr/lib/cups/filter/

Now change the permissions

sudo chown root:root /usr/lib/cups/filter/pstoricohddst-gdi

 

Add Printer > Choose Ricoh SP 111 > Model > Provide ppd file (RICOH_Aficio_SP_111.ppd)

Another method

To add printer from the ppd file: In your web browser, navigate to http://localhost:631/

CUPS for Administrators > Adding Printers and Classes Printers > Add a printer Enter your root username and password

 


Thursday, September 8, 2016

How to Move Unity Launcher to Bottom in ubuntu 16.04

How to Move Unity Launcher to Bottom in ubuntu 16.04

Now you can move your unity launcher to bottom in Ubuntu 16.04.
Move unity launcher to bottom

use the following command

$ gsettings set com.canonical.Unity.Launcher launcher-position Bottom


Move unity Launcher to left

$ gsettings set com.canonical.Unity.Launcher launcher-position Left


Monday, July 4, 2016

Features of Serial Wifi Module Esp8266





Main features of ESP8266 are:
  • Integrated low-power 32-bit MCU
  • 802.11 b/g/n protocol
  • UART/SPI/I2C/GPIO/ADC/PWM
  • Infrastructure BSS Station mode / P2P mode / softAP mode support
  • Integrated TCP/IP protocol stack
  • WPA/WPA2 PSK, and WPS driver
  • built-in AT Command firmware
  • Integrated PLL, regulators and power-management units
  • +19.5dBm output power in 802.11b mode
  • Antenna diversity and selection (software managed hardware)
  • SDIO 2.0, SPI, UART
  • Maximum frequency is 80MHz
  • 64k bytes of instruction RAM
  • 96k bytes of data RAM
  • 64k bytes of boot RAM
  • RISC architecture

Monday, June 27, 2016

How to run H.265 / HEVC codec Movies on Ubuntu 16.04

How to run  H.265 / HEVC codec Movies  on Ubuntu 16.04

Add the following repository

$ sudo apt-add-repository ppa:strukturag/libde265 $ sudo apt-get update

 

Now install gstreamer

$ sudo apt-get install gstreamer0.10-libde265
 
Install vls Plugin
 
$ sudo apt-get install vlc-plugin-libde265 

Now your system is ready to run 
H.265 / HEVC codec Movies

 

Sunday, June 26, 2016

Nodemcu (ESP8266) Based Device Control Using Arduino IDE


This Experiment will help you to "Turn On and Turn Off" an LED that has connected to the Nodemcu (Esp8266), the Nodemcu has programmed from Arduino IDE to control the Device (here it is LED).

  Connect Nodemcu ( Esp8266)  to the Wi-Fi  using SSID and password .


After uploading the program , use Serial monitor to find the IP Address and url for controlling Device



#include <ESP8266WiFi.h>
 
const char* ssid = "your SSID";
const char* password = "Your Password";
 
int ledPin = 2; // GPIO13 // NodMcu builtin LED
WiFiServer server(80);
 
void setup() {
  Serial.begin(115200);
  delay(10);
 
  pinMode(ledPin, OUTPUT);
  digitalWrite(ledPin, HIGH);
 
  // Connect to WiFi network
  Serial.println();
  Serial.println();
  Serial.print("Connecting to ");
  Serial.println(ssid);
 
  WiFi.begin(ssid, password);
 
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }
  Serial.println("");
  Serial.println("WiFi connected");
 
  // Start the server
  server.begin();
  Serial.println("Server started");
 
  // Print the IP address
  Serial.print("Use this URL to connect: ");
  Serial.print("http://");
  Serial.print(WiFi.localIP());
  Serial.println("/");
 //see your serial monitor with boud rate 115200 for see the link
}
 
void loop() {
  // Check if a client has connected
  WiFiClient client = server.available();
  if (!client) {
    return;
  }
 
  // Wait until the client sends some data
  Serial.println("new client");
  while(!client.available()){
    delay(1);
  }
 
  // Read the first line of the request
  String request = client.readStringUntil('\r');
  Serial.println(request);
  client.flush();
 
  // Match the request
 
  int value = LOW;
  if (request.indexOf("/LED=ON") != -1)  {
    digitalWrite(ledPin, LOW);
    value = LOW;
  }
  if (request.indexOf("/LED=OFF") != -1)  {
    digitalWrite(ledPin, HIGH);
    value = HIGH;
  }
 
// Set ledPin according to the request
//digitalWrite(ledPin, value);
 
  // Return the response
  client.println("HTTP/1.1 200 OK");
  client.println("Content-Type: text/html");
  client.println(""); //  do not forget this one
  client.println("<!DOCTYPE HTML>");
  client.println("<html>");
 
  client.print("LED STATUS ");
 
  if(value == LOW) {
    client.print("ON");
  } else {
    client.print("OFF");
  }
  client.println("<br><br>");
  client.println("<a href=\"/LED=ON\"\"><button>Turn On </button></a>");
  client.println("<a href=\"/LED=OFF\"\"><button>Turn Off </button></a><br />");  
  client.println("</html>");
 
 delay(1);
  Serial.println("Client disonnected");
  Serial.println("");
 
}

Arduino NodeMcu (ESP8266) Pin Mapping

 
 Arduino NodeMcu (ESP8266) Pin Mapping 
 
 If you use  NodeMcu borad  with Arduino IDE the following chart will help to find the pin maping

eg. NodeMCU Pin D1 is equivalent to arduino Pin 5. 


Built in LED of NodeMCU is connected to D4  in arduino programming it equivalent to Pin 2 
 
NodeMCU      Arduino
 D0      =    16
 D1      =    5
 D2      =    4
 D3      =    0
 D4      =    2
 D5      =    14
 D6      =    12
 D7      =    13
 D8      =    15
 D9      =    3
 D10     =    1