CyberKeeda In Social Media

How to install MS Paint alternative Pinta on Ubuntu 18.04

Missing MS Paint and it's user friendly featues on Ubuntu, Pinta can address almost all your needs.

Pinta is a Open Source, easy-to-use open-source drawing and image editing program designed for entry-level users. It provides users with a simple yet powerful way to draw and edit images on Linux, Mac, and Windows.


Drawing Tools
Effects (Blur, Glow, Warp etc)
Image Adjustments (Auto Level, Black, and White, Sepia etc)
Unlimited undo/redo

And much more...

Here is the video tutorial for the installation.

Read more ...

How to create WiFi Hotspot on Ubuntu 18.04

You might be looking to turn your Ubuntu 18.04 Laptop into to WiFi Hotspot to share your Broadband Connection/Internet Connection across you for your other devices ( Mobile, Ipads, etc ).

So you are just a few clicks away to achieve it, believe me it's as easy as you do within your smartphone.


Click on the top right buttons and click on the WiFi option. in the dropdown select Wifi-settings.

Click on 'Turn On Wi-Fi ' option from the button.

Click on the extra options ( 3 dots ), now Click on 'Turn On Wi-Fi Hotspot'

The Hotspot is now active!!

you can find the password and details.

Now any of your devices can discover this Hotspot and connect to it with the given password.

Video Tutorial:

Read more ...

How to Change Ubuntu 18.04 Lock Screen look like MacOS

Here is the Video tutorial for the same.

Read more ...

BASH Shell Scripting Cheat Sheet : Part 1

Commonly used UNIX Commands!!

Cheat sheet to use within your shell scripts

1.How to display the 10th line of a file?
head -10 filename | tail -1
2. How to remove the header from a file?
sed -i '1 d' filename
3. How to remove the footer from a file?
sed -i '$ d' filename
4. Write a command to find the length of a line in a file?
The below command can be used to get a line from a file.
sed –n '<n> p' filename
We will see how to find the length of 10th line in a file
sed -n '10 p' filename|wc -c
5. How to get the nth word of a line in Unix?
cut –f<n> -d' '
6. How to reverse a string in unix?
echo "java" | rev
7. How to get the last word from a line in Unix file?
echo "unix is good" | rev | cut -f1 -d' ' | rev
8. How to replace the n-th line in a file with a new line in Unix?
sed -i'' '10 d' filename       # d stands for delete
sed -i'' '10 i new inserted line' filename     # i stands for insert
9. How to check if the last command was successful in Unix?
echo $?
Any integer apart from 0 indicates failure or the last command was unsuccessful
10. Write command to list all the links from a directory?
ls -lrt | grep "^l"
11. How will you find which operating system your system is running on in UNIX?
uname -a
12. Create a read-only file in your home directory?
touch file; chmod 400 file
13. How do you see command line history in UNIX?
The 'history' command can be used to get the list of commands that we are executed.
14. How to display the first 20 lines of a file?
By default, the head command displays the first 10 lines from a file. If we change the option of head, then we can display as many lines as we want.
head -20 filename
An alternative solution is using the sed command
sed '21,$ d' filename
The d option here deletes the lines from 21 to the end of the file
15. Write a command to print the last line of a file?
The tail command can be used to display the last lines from a file.
tail -1 filename
Alternative solutions are:
sed -n '$ p' filename
awk 'END{print $0}' filename
16. How do you rename the files in a directory with _new as suffix?
ls -lrt|grep '^-'| awk '{print "mv "$9" "$9".new"}' | sh
17. Write a command to convert a string from lower case to upper case?
echo "apple" | tr [a-z] [A-Z]
18. Write a command to convert a string to Initcap.
echo apple | awk '{print toupper(substr($1,1,1)) tolower(substr($1,2))}'
19. Write a command to redirect the output of date command to multiple files?
The tee command writes the output to multiple files and also displays the output on the terminal.
date | tee -a file1 file2 file3
20. How do you list the hidden files in current directory?
ls -a | grep '^\.'
21. List out some of the Hot Keys available in bash shell?
Ctrl+l - Clears the Screen.
Ctrl+r - Does a search in previously given commands in shell.
Ctrl+u - Clears the typing before the hotkey.
Ctrl+a - Places cursor at the beginning of the command at shell.
Ctrl+e - Places cursor at the end of the command at shell.
Ctrl+d - Kills the shell.
Ctrl+z - Places the currently running process into background.

22. How do you make an existing file empty?
cat /dev/null >  filename
23. How do you remove the first number on 10th line in file?
sed '10 s/[0-9][0-9]*//' < filename
24. What is the difference between join -v and join -a?
join -v : outputs only matched lines between two files.
join -a : In addition to the matched lines, this will output unmatched lines also.
25. How do you display from the 5th character to the end of the line from a file?
cut -c 5- filename
26. Display all the files in current directory sorted by size?
ls -l | grep '^-' | awk '{print $5,$9}' |sort -n|awk '{print $2}'
27. Write a command to search for the file 'map' in the current directory?
find -name map -type f
28. How to display the first 10 characters from each line of a file?
cut -c -10 filename
29. Write a command to remove the first number on all lines that start with "@"?
sed '\,^@, s/[0-9][0-9]*//' < filename
30. How to print the file names in a directory that has the word "term"?
grep -l term *
The '-l' option make the grep command to print only the filename without printing the content of the file. As soon as the grep command finds the pattern in a file, it prints the pattern and stops searching other lines in the file.
31. How to run awk command specified in a file?
awk -f filename
32. How do you display the calendar for the month march in the year 1985?
The cal command can be used to display the current month calendar. You can pass the month and year as arguments to display the required year, month combination calendar.
cal 03 1985
This will display the calendar for the March month and year 1985.
33. Write a command to find the total number of lines in a file?
wc -l filename
Other ways to pring the total number of lines are
awk 'BEGIN {sum=0} {sum=sum+1} END {print sum}' filename
awk 'END{print NR}' filename
34. How to duplicate empty lines in a file?
sed '/^$/ p' < filename
35. Explain iostat, vmstat and netstat?
Iostat: reports on terminal, disk and tape I/O activity.
Vmstat: reports on virtual memory statistics for processes, disk, tape and CPU activity.
Netstat: reports on the contents of network data structures.
36. How do you write the contents of 3 files into a single file?
cat file1 file2 file3 > file
37. How to display the fields in a text file in reverse order?
awk 'BEGIN {ORS=""} { for(i=NF;i>0;i--) print $i," "; print "\n"}' filename

38. Write a command to find the sum of bytes (size of file) of all files in a directory.
ls -l | grep '^-'| awk 'BEGIN {sum=0} {sum = sum + $5} END {print sum}'

39. Write a command to print the lines which end with the word "end"?
grep 'end$' filename
The '$' symbol specifies the grep command to search for the pattern at the end of the line.
40. Write a command to select only those lines containing "july" as a whole word?
grep -w july filename
The '-w' option makes the grep command to search for exact whole words. If the specified pattern is found in a string, then it is not considered as a whole word. For example: In the string "mikejulymak", the pattern "july" is found. However "july" is not a whole word in that string.
41. How to remove the first 10 lines from a file?
sed '1,10 d' < filename
42. Write a command to duplicate each line in a file?
sed 'p' < filename
43. How to extract the username from 'who am i' comamnd?
who am i | cut -f1 -d' '
44. Write a command to list the files in '/usr' directory that start with 'ch' and then display the number of lines in each file?
wc -l /usr/ch*
Another way is
find /usr -name 'ch*' -type f -exec wc -l {} \;
45. How to remove blank lines in a file ?
grep -v ‘^$’ filename > new_filename
46. How to display the processes that were run by your user name ?
ps -aef | grep <user_name>
47. Write a command to display all the files recursively with path under current directory?
find . -depth -print
48. Display zero byte size files in the current directory?
find -size 0 -type f
49. Write a command to display the third and fifth character from each line of a file?
cut -c 3,5 filename
50. Write a command to print the fields from 10th to the end of the line. The fields in the line are delimited by a comma?
cut -d',' -f10- filename

Read more ...

How to Upgrade Ubuntu 16.04 to Ubuntu 18.04

For Linux Desktop users, this is the trending stuff all going into the Linux World.
Of Course there are a hundreds of Linux distros, but Ubuntu is one of the popular one as per distrowatch.

Ubuntu provids two types of releases

  • Standard release. 
  • Long Term Support (LTS) release. 

So what's the difference between these two ?
All it's support provided by Ubuntu aka Canonical
Standard releases for approx 1 year while Long Term Support is useful for approx 5 years.

Ubuntu 18.04 is an LTS release will be supported till 2023. 

If you are also a Ubuntu Desktop Fan and running Ubuntu 16.04, why wait let's upgrade.

But if you are running ubuntu 16.04 within your server, i recommend you to wait for a minimum of two months from release date.

Backup your data first.

We strongly recommended to backup all your important data from your Desktop to a remote location or into some external storage.

Update all your system packages.

sudo apt-get update
sudo apt-get upgrade

Install Update Manager 

sudo apt-get get install update-manager-core
Once the update-core-manager package has been installed, let's ensure it's config file is set to LTS
Open the file /etc/update-manager/release-upgrades file and make sure Prompt value is set to lts like below.

Upgrade your  Ubuntu from 16.04 to 18.04

Once you are done with the updation of file /etc/update-manager/release-upgrades updation , you are all set to upgrade your UBuntu to newer version of LTS that is 18.04.
sudo do-release-upgrade -d 
Once you have executed the upgrade command, you must stick to your computer for some more few minutes.
It will ask for few inputs from your side,  follow the prompts and choose the default ones, the entire upgrade time duration is totally dependent on your internet connectivity speed.

Once completed,  reboot your System and verify your Ubuntu Version.

lsb_release -a
You must see something like below

Distributor ID: Ubuntu
Description: Ubuntu 18.04 LTS
Release: 18.04
Codename: bionic

Read more ...

Apache Hardening : Limit Request Size

By default Apache has no limit on the total size of the HTTP request i.e. unlimited and when you allow large requests on a web server its possible that one could be a victim of Denial of service attacks. We can Limit the requests size of an Apache directive “LimitRequestBody” with the directory tag.

This is generally preffered for websites/blogs that gives an upload option through http protocol
Unlimited upload size can really effect and site can be compromised by attackers  using DDos.

One can set the value in bytes from 0 (unlimited) to 2147483647 (2GB) that are allowed in a request body. You can set this limit according to your site needs.

Here in this example, my_uploads is a directory which contains files uploaded by users. We are We We will put a limit of  500K  for this by making the changes in Apache configuration file ( httpd.conf ).

<Directory "/var/www/mywebsite/my_uploads">
LimitRequestBody 512000

Read more ...

Installation of Apache Tomcat on Ubuntu

  • Download and install OpenJDK package for java ( Mandatory )
  • Download Tomcat tarball from Official Tomcat Webpage
  • Untar / Unzip the tarball.
  • Make a directory specific for tomcat and it's relevant files
  • Move tomcat files to specific tomcat directory
  • Locate the and file in order to start/stop

Here we are about to download and install Tomcat 8 on CentOS 6.8

Install OpenJDK to fulfill java requirement.
## sudo apt-get instal openjdk*
Make a directory specific for Tomcat.
## sudo mkdir /opt/tomcat
Download Apache Tomcat from here official website 

Move the downloaded tarball apache-tomcat-x.xx.x.tar.gz into /opt/tomcat

## sudo mv  apache-tomcat-8.5.13.tar.gz /opt/tomcat/
Unzip the tarball
## tar -xvf apache-tomcat-8.5.13.tar.gz
After unzipping the tarball there would be something folder named as apache-tomcat-8.xx.xx

Toggle into unzipped directory

## cd /opt/tomcat/apache-tomcat-8.xx.xx/bin/
Look for file and

# Start tomcat using the startup script

## ./
Stop the same from.

## ./

 Once you toggle into unzipped tomcat parent directory below are the sub directories that has a significance value and it's is responsibility.
 Lets go through the Apache Tomcat Directory and know why they exists,

bin  ==> It contains all binary and script files for running tomcat
lib  ==> Contains shared library files used by tomcat
conf ==> Contains configuration files such as port, directories etc
logs ==> Contains various log files related to tomcat, ex -- catalina.out
temp ==> Conatins temp files associated with tomcat 
webapps ==> Important folder,application war files are dumped over here only
work ==> If application contain any jsp then jsp is translated and converted into servlet its stores here.

Tomcat looks for multiple environment variables to be defined in order to run, these are enlisted below.
The mandatory environment variable that are supposed to defined in order to run Tomcat.

  1. This one is the most important Environment variable that needs to be defined in order to run multiple instances of tomcat within same host.
  2. This directory defined must point to the main tomcat instance which contains all extracted binary data including the bin and lib directory
  3. So based on CATALINA_HOME we will get lib and bin directory
Based on above variable, server uses conf, logs, webapps, work folder

Read more ...

BASH: How to transform Vertical list into Horizontal list

This one liner will definitely help you, as i too believe this is one of the common requirement in order to solve complex requirements of various shell scripts.

While developing a script , i got a requirement to transform all vertical strings appended one after another into a single horizontal line.

Here is the example to make you understand my requirement and the end result as STDOUT.

[ ~]# cat myfile.txt
Hello World !
So i want it to look like  the below one

Hello World ! This is my blog

There are multiple ways and tools to accomplish the same task, but i found  tr  as the best and short one.

[ ~]# cat myfile.txt |  tr '\n' ' '

I will be posting multiple ways later into the same post , to share more ways to do that.

Read more ...

How to use Rsync behind proxy

Usually one needs to export proxies url/ip in order to upload/download content while running behing proxy with shell or any terminal sessions.

Please keep in mind even exporting  http_proxy and https_proxy , rsync will not work.

cybeerkeeda@Linux-Maniac:~ export

Do replace rsync_proxy=with_your_proxy_url:port
Read more ...

Ubuntu: Stop pdf to open with default ImageMagick

Surprisingly after migrating from Unity to Cinnamon DE, i found a very annoying and strange behaviour or my default  application  for PDF .

Instead of Document Viewer, it's using ImageMagick to open each PDF document, though i have adobe reader within my Ununtu 16.04, but it's not ready to leave ImageMagick at all.

So now , as always our friend is Terminal, follow the below steps to get rid of ImageMagick.

  • edit the file   ~/.config/mimeapps.list

Now remove the lines that associates PDF to imagemagick in the file:

  • image/pdf=display-im6.desktop
  • image/pdf=display-im6.q16.desktop;display-im6.desktop;
I have performed these steps within my Ubuntu 16.04, hope this gonna work for you too.

Read more ...
Designed By Kunal Saha