Search blog

Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Thursday, February 2, 2023

[SOLVED]: Yarn Debian Key Expiry Date Updated

 Solved by re-installing:

 curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -  
 echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list  
 sudo apt update  
 sudo apt install yarn  

Ref: https://linuxize.com/post/how-to-install-yarn-on-ubuntu-20-04/

Friday, January 18, 2019

[SOLVED] - Fix Corrupt NTFS Parition In Ubuntu Using ntfs-3g, Without Using Windows OR fsck

Since yesterday, I've been trying to backup my hard drive using Clonezilla but without any success. Twice I got the following error, when I tried to backup my full hard drive by using Clonezilla.

ntfsclone-ng.c: NTFS Volume '/dev/sda6/' is scheduled for  a check or it was shutdown uncleanly. Please boot Windows or fix it by fsck
& I know why this issue has cropped up. Few days back I used GParted to expand my main ext4 partition that has Ubuntu installed on it by using a chunk from another NTFS partition.

 >> SOLUTION:


Here's what worked for me. Open your terminal [CTRL+ALT+T]:

1. First list all the partition in your hard drive.

 df -h  

You should be getting a list of parition as shown in the image below. In my case, the NTFS parition is '/dev/sda6.'

[SOLVED] - Fix Corrupt NTFS Parition In Ubuntu Using fsck Without Using Windows
Click on image to enlarge

 2. Now unmount the NTFS partition using the following command. Please note, the command is 'umount' and not 'unmount.'

 sudo umount /dev/sda6  

3. If you do not have ntfs-3g installed, you can install it using the following command:

 sudo apt-get install ntfs-3g  

4. Now run the ntfs-3g command to check/repair your corrupt/problematic NTFS partition:

 sudo ntfsfix -b -d /dev/sda6  
here,
  • b: clear-bad-sectors -- Clear the bad sector list 
  • d: clear-dirty -- Clear the volume dirty flag

5. If the CHECK/REPAIR operation is successful, you should be getting a message as shown in the image below:

Click on image to enlarge
>> REF: Fix corrupt NTFS partition without Windows

Monday, September 3, 2018

[SOLVED] - Thunderbird Could Not Get Password - Fix for Ubuntu/Linux

If you have been getting the following error "Thunderbird Could Not Get Password," and because of this have been unable to log into your Email Account or Send Emails, you can try the solution below that worked for me.

>> Close your Thunderbird Email Client. Goto your Home folder and Press CTRL+H to view hidden folders, or in your Menu, goto View >> Show Hidden Files.

[SOLVED] - Thunderbird Could Not Get Password for Ubuntu
Click on image to enlarge
>> Click on the .thunderbird folder.

[SOLVED] - Thunderbird Could Not Get Password for Ubuntu
Click on image to enlarge
>> Click on the shbh8pem.default folder.

Click on image to enlarge
>> DELETE the following two files as highlighted in the image above:
  • cert8.db
  • key3.db 
>> Now OPEN Thunderbird and press F5 to Send/Receive Emails. If it prompts for a password enter it.

>> Try SENDING an Email from. If it prompts for a password enter it.

>> If the above solution doesn't work, RESTART your system, and repeat the steps above.

>> Your problem should have been resolved now.

Sunday, May 27, 2018

Check Disk Space Usage from Terminal in Ubuntu/Linux

To view disk space usage of your partitions/hard drive in your terminal, use the following command:
 df -h  
You should get result as shown in the image below:
Check Disk Space Usage from Terminal in Ubuntu/Linux
Click on image to enlarge

Tuesday, March 13, 2018

[SOLVED]-Remove AppImage Desktop Integration


To remove the desktop integration for your AppImage, follow the instruction below:

Since an AppImage is not "installed", you don't need to "uninstall" it. Just delete the AppImage file and the application is gone. Additionally you may want to remove menu entry by deleting the desktop file from $HOME/.local/share/applications/.

Source:
  1. How can I uninstall an AppImage?
  2. How To Use AppImage in Linux [Complete Guide]
  3. AppImage Website

Saturday, January 6, 2018

Install & Use SP Flash Tool in Linux/Ubuntu Systems

>> Download Links:

 You can also follow the tutorial here: http://bit.ly/2lWjFlj, and I strongly recommend you to follow the steps there. Below, I will point out the main step you have to note, from the above tutorial, for a successful installation, and that step is Step 4 which reads as follows:

"Now we come to the interesting part, which cost me 2 weeks of (futile) research and frustration. Finally I found Sergio Riveros tutorial on mibqyyo. Thanks to him again and again and again for this priceless piece of information.

Quote:
"The 'modemmanager' package integrated by default within Linux Ubuntu 14.04 and later is not compatible with the MTK Flash Tool for Linux."

To put it in different words: The modem manager controls port /dev/ttyACM0 and disables the Flash Tool. So we blacklist it for the two MTK vendor IDs the flash tool uses:
 sudo gedit /etc/udev/rules.d/20-mm-blacklist-mtk.rules  
You insert these two lines:
 ATTRS{idVendor}=="0e8d", ENV{ID_MM_DEVICE_IGNORE}="1"  
 ATTRS{idVendor}=="6000", ENV{ID_MM_DEVICE_IGNORE}="1"  
Save the file, exit and restart udev:
 sudo service udev restart  
Switch your phone on (fastboot mode will suffice) and off again."

 >> Watch the video below to learn how to use the SP Flash Tool in Linux:




For list of SP Flash Tool - Errors, their meanings and how to resolve them, you may check the following link: http://bit.ly/2CDWbvT.

[SOLVED] - Flash Lenovo A7700 Stock ROM & Other MTK Phones Using SP Flash Tool

Recently my Lenovo A7700 mobile phone started crashing and giving various problems. Often, it would prompt messages such as "Google Service Framework has stopped working" or "Unfortunately, Google Play services has stopped" and lots of other errors, which eventually would cause the phone to crash. The only solution that would make the mobile functional again was to remove the battery and start the phone.

Then I tried flashing my phone with Stock ROMS & Custom ROMS hoping to resolve my problem. In the process I came across some interesting tools like SP Flash Tool, SN Write Tool etc. The tutorial below explains the working steps to successfully operate the SP flash tool.

Using SP Flash Tool, I have successfully flashed my phone in both Windows and Linux. In this post I will explain how to flash your Lenovo A7700 in Linux/Ubuntu. This same method can be used for flashing various other MTK based Android phones. Also find below the download links for SP Flash Tool, SN Write Tool & stock firmware for Lenovo A7700.

>> Download Links:


>> To install SP Flash tool in Linux, and to learn how to use it, please check this link: http://bit.ly/2qu5n15


Please refer to the video above to get an overview of the overall flashing procedure, and use the steps below for crosschecking your steps, and as further reference.

Step 1: Open your SP flash Tool as shown in the video above.

Step 2: Load your 'scatter.txt' file.

Step 3: Select 'Download Only' and then click on Download.

Step 4: Now turn off your phone and don't remove the battery if your are trying to flash the Lenovo A7700. In others you might have to, you can do trial and error and confirm.

Step 5: Now press the Volume Down button and connect your USB data cable to your phone and your computer.

Step 6: The flashing process should start now as shown in the video above.

For a list of SP Flash Tool - Errors, their meanings and how to resolve them, you may check the following link: http://bit.ly/2CDWbvT.

Tuesday, October 10, 2017

[SOLVED] - Allow Other Users to Access Your Localhost Website In Your LAN

Follow the instructions below, if you would like to allow access to your localhost website amongst your peers in the same Local Area Network:

1. First, you may create a Virtual Host for your local website. To learn how to create virtual host in your localhost, you can go through my following tutorials. If you make use of virtual host then you can use local domain name such as http://wordpress.local or http://drupal.local etc. If you do not make use of localhost then
If you aren't using Virtual Host then you will have to use something like http://192.168.1.1:80/path-to-website. Here:
  • 192.168.1.1 is your local ip. Visit this link to find your local ip: https://goo.gl/NT31td
  • 80 is the port number, which is the port number for http, the port that is used to access your website locally and remotely
 2. Once you have created your Virtual Host then your peers will need to update their host file by adding the lines below:

 127.0.0.1     example.local  

where,
  •  127.0.0.1 needs to be replaced with your local ip
  • example.local needs to be replaced with the virtual host you created for your website
To update your host file check the respective link below :

Check Active Port & Port Numbers In Your Localhost-Ubuntu System

If you would like to know the active/open ports, or in networking terms, which ports are listening and their port numbers in your Ubuntu system, open your terminal and enter the following command:

 sudo nmap -sT -O localhost  

Then you should get output as shown in the image below:

Check Active Port & Port Numbers In Your Localhost-Ubuntu System
Click on image to enlarge

For further reading, you may visit the following page: Verifying Which Ports Are Listening

Sunday, March 26, 2017

[SOLVED] - Add Currently Logged in User to Apache User & Group [www-data:www-data]

If you are experiencing permission issues with your web directories and files, use the following commands to resolve it, This solution is very helpful if you are trying to run Wordpress/Other CMS in localhost environment:

1. Adds the currently logged in user to the www-data group.

 sudo usermod -aG www-data $USER  

2. Changes the ownership of the /var/www directory to www-data group.
 sudo chown -R www-data:www-data /var/www directory_name

3. Sets the proper permissions so you can upload files via sftp, manage files via command-line, and upload plugins and media directly in WordPress.
 sudo chmod -R 774 /var/www directory_name

Saturday, March 11, 2017

How to Zip/Compress files using Terminal in Ubuntu/Linux

Use the following commands to compress your files using terminal. First, make sure you have Zip already installed in your system.

>> To install Zip: Open you terminal (CTRL+ALT+T) and enter the command below:
 sudo apt-get install zip gzip tar  

>> To Zip:
 zip -r compressed_filename.zip foldername  

where:
  • r: recursive
  • compressed_filename.zip: name of your .zip folder you want to create. Example: magento-file-sys.zip
  • folder_name: name of the folder that you want to compress
Seems to be much faster and consume almost 80%-90% less CPU processes than the one using GUI/Archive Manager.; but file size seems to be large by 10-20 MB than the one created using the menu option available in GUI/Archive Manager.

>> To Unzip:
 unzip my_arch.zip  

Zip stores relative path names by default. There are several parameter-options available for zip. For that read: the manual (man zip). For a starting this will do.

Most often you will see .tar.gz endings in linux-world. That's the product of two tools: TAR (the tape archiver) and GZIP (the GNU-Zip). Tar has got the call option to automatically gzip/gunzip files after "taring".
 tar -cvzf may_arch.tar.gz my_folder  

where:
  • -c means "create"
  • -v means "verbose" (sometimes bothersome and slowing down...)
  • -z means "use (GNU)zip"
  • -f XYZ declares the name of the output file. (You should chose a helping name like XYZ.tar.gz)
There may also be .tar.bz2 endings. This is the product of the -j parameter instead of the -z parameter: you will choose compression with BZIP2 (-> man bzip2).

To extract you simply use -x (eXtract) instead of -c (Create):
 tar -xvzf may_arch.tar.gz  

Wednesday, March 8, 2017

[SOLVED] - W: GPG error: .. The following signatures were invalid: BADSIG ... Ubuntu Extras Archive Automatic Signing Key

While trying to UPDATE/UPGRADE your Ubuntu system from the terminal, you might be bumping, time and again into what is called the BAD SIGNATURE error. Something like this:

W: GPG error: http://01.archive.ubuntu.com trusty Release: The following signatures were invalid: BADSIG 16126D3A3E5C1192 Ubuntu Extras Archive Automatic Signing Key <ftpmaster@ubuntu.com>

To solve the bad signature error in your Ubuntu Installation try the following solution:
 sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys your_key_number  
 Example: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 16126D3A3E5C1192  
Rebuild your software cache:
 sudo apt-get clean   
 cd /var/lib/apt   
 sudo mv lists oldlist   
 sudo mkdir -p lists/partial   
 sudo apt-get clean   
 sudo apt-get update  
If the above solution doesn't work, you may try the solution below:
 $ sudo -i  
 # apt-get clean  
 # cd /var/lib/apt  
 # mv lists lists.old  
 # mkdir -p lists/partial  
 # apt-get clean  
 # apt-get update  

Tuesday, January 19, 2016

Steps for Creating SSH Connection in Ubuntu 14.04

1. First you should generate an SSH key pair on your Linux distribution. Open up your terminal and execute the following commands:

 user@localhost: ssh-keygen -t dsa  
 Generating public/private dsa key pair.  
 Enter file in which to save the key (/home/user/.ssh/id_dsa): (just press Enter here)  
 Enter passphrase (empty for no passphrase):  
 Enter same passphrase again:  
Once you've entered the passphrase you will see the following message as below:
 Your identification has been saved in id_dsa.  
 Your public key has been saved in id_dsa.pub.  
 The key fingerprint is:  
 16:8e:e8:f2:1d:c9:b9:cf:43:9a:b3:3c:c1:1f:95:93 user@localhost  

This will create a private key written to /home/user/.ssh/id_dsa and a public key written to /home/user/.ssh/id_dsa.pub. The passphrase is used to protect your key. You will be asked for it when you connect via SSH.

2. If you are using cPanel then log into it and open the SSH section. Then open the file 'id_dsa.pub' in a text editor like Gedit. The file will be located at '/home/user/.ssh/id_dsa.pub.' The '.ssh' directory might be hidden so press 'CTRL+H' to view hidden files & folders. Select ALL & COPY the content of the file inside the box with the label 'Public Key (DSA only):' Look at the image below.



3. Logging in to your Web Hosting account via SSH in Linux:

 user@localhost: ssh-add /home/user/.ssh/id_dsa  
 Enter passphrase for id_dsa:  
 Identity added: id_dsa (id_dsa)  

(The passphrase is the same as the one you have set during the generation of the SSH key in Step 1).

Then you should initiate an SSH connection:

user@localhost: ssh USER@HOST_NAME -pPORT

  • USER - the user for which you want to establish the SSH connection; this will be the same username as the one you use to log in to your cPanel.
  • HOST_NAME (or IP address) - here you should enter the host/IP of the server to which you wish to connect (e.g. siteground300.com);
  • PORT - the port for the connection - here you should enter the port provided by your Web Host; try something like -p18765
Press "Enter" and if everything has been set up properly, you will establish an SSH connection to your account.

Monday, July 20, 2015

How To Clear MySQL Screen In Ubuntu/Linux Terminal

While at your MySQL terminal enter the command below:

 mysql> \! clear  

Wednesday, April 8, 2015

Alternative to Adobe Reader in Ubuntu 14.04 for Anottation, Text Hightlighting etc...

I found this wonderful alternative to Adobe Reader for Ubuntu/Linux and it's called Okular which is a free software PDF reader.

What is it?

Here what there website says:
Okular is a universal document viewer based on KPDF for KDE 4. This means Okular works on multiple platforms, including but not limited to Linux, Windows, Mac OS X, *BSD, etc.

Okular combines the excellent functionalities of KPDF with the versatility of supporting different kind of documents, like PDF, Postscript, DjVu, CHM, XPS, ePub and others.

The document format handlers page has a chart describing in more detail the supported formats and the features supported in each of them.
 Okular gives you various options such as annotation, text highlighting, text extraction etc.

To install Okular in your Ubuntu:

 sudo apt-get update  
 sudo apt-get install okular  

Monday, January 5, 2015

Install LAMP Stack in Ubuntu 14.04 with a Single Command & PHP Modules

You can install LAMP stack in Ubuntu 14.04 with a single command. Here's the command:

 $ sudo apt-get install apache2 php5 php5-mysql mysql-client mysql-server  

During the installation process you will be asked to enter PASSWORD for your MySQL 'root' user account. This is optional.

Once the installation is successful you can crosscheck by creating a info.php file under 'var/www/htm/info.php' containing the code below:

 <?php phpinfo(); ?>  

Now open a browser and view the result of the above PHP file. If you are using a localhost you can enter the forllowing URL in your browser:

 http://localhost/info.php  

Install PHP Modules

If you would like to add some additional modules to enhance your PHP read below:

To see the available options for PHP modules and libraries, you can type this into your system:

 apt-cache search php5-  

The results are all optional components that you can install. It will give you a short description for each:

 php5-cgi - server-side, HTML-embedded scripting language (CGI binary)  
 php5-cli - command-line interpreter for the php5 scripting language  
 php5-common - Common files for packages built from the php5 source  
 php5-curl - CURL module for php5  
 php5-dbg - Debug symbols for PHP5  
 php5-dev - Files for PHP5 module development  
 php5-gd - GD module for php5  
 . . .  

To get more information about what each module does, you can either search the internet, or you can look at the long description in the package by typing:

 apt-cache show package_name  

If, after researching, you decide you would like to install a package, you can do so by using the apt-get install command like we have been doing for our other software.

If we decided that php5-cli is something that we need, we could type:

 sudo apt-get install php5-cli  

If you want to install more than one module, you can do that by listing each one, separated by a space, following the apt-get install command, like this:

 sudo apt-get install php5-cgi php5-cli php5-curl php5-mysql php5-odbc php5-memcache php5-memcached php5-oauth  

Wednesday, December 31, 2014

Installing LastPass in Chromium in Ubuntu/Linux

To install LastPass in Chromium & Linux enter the commands below:

First download LastPass from here: https://lastpass.com/lplinux.php

Then open terminal using CTRL+ALT+T and go to the directory you've downloaded the LastPass tar and untar it and enter the command below:
 sudo tar -xvzf lplinux.tar.bz2  

 sudo ./install_lastpass.sh  

Sunday, December 28, 2014

Unable To Import Or Upload SQL Dump, Database in phpMyAdmin

If you are unable to import or upload your database dump into your phpMyAdmin and have been getting the following error:
No data was received to import. Either no file name was submitted, or the file size exceeded the maximum size permitted by your PHP configuration.
You can try the following code to resolve the issue:

 chmod -R 777 /var/lib/phpmyadmin/tmp  

Restart Apache:

 sudo service apache2 restart  

Sunday, December 14, 2014

Connect USB Wireless Adapter to Kali Linux in Virtualbox


[SOLVED] - HOW TO FIX: W: Possible missing firmware /lib/firmware/rtl_nic/rtl8168d-2.fw

While trying to update initramfs I encountered an error which took me quite sometime to fix. After trying various solutions this is what worked for me.

ERROR: 
 W: Possible missing firmware /lib/firmware/rtl_nic/rtl8168d-2.fw for module r8169  
 W: Possible missing firmware /lib/firmware/rtl_nic/rtl8168d-1.fw for module r8169  

You can do a (Open your terminal & check):
 sudo update-initramfs -u  

To see if you have this problem.

Next Check which Realtek chipset you have using: 
 lspci  

If you have an r8168 chipset go here:

Find the "r8168-8.039.00" drivers for Ubuntu/Linux in the 'Unix (Linux)' section of the page.

Download the r8168-8.039.00.tar.bz2 file to your linux box.

In the terminal go to the directory where you've downloaded the above file & Unpack the tarball :
 tar vjxf r8168-8.aaa.bb.tar.bz2  

Change to the extracted/unzipped directory:
 cd r8168-8.039.00  

If you are running the target kernel, then you should be able to do :
 sudo ./autorun.sh  

finally do another 
 sudo update-initramfs -u  

to make sure the error goes away

reboot

Top 5 Posts (Weekly)