Skip to content

Instantly share code, notes, and snippets.

@bijay-shrestha
Last active July 5, 2019 05:55
Show Gist options
  • Save bijay-shrestha/291e782f4e97a0f32ea12c2fdc8bf702 to your computer and use it in GitHub Desktop.
Save bijay-shrestha/291e782f4e97a0f32ea12c2fdc8bf702 to your computer and use it in GitHub Desktop.

Password Reset

To reset root as well as normal user's password type

passwd

Changing password for bijay.

(current) UNIX password: 

Enter new UNIX password: 

Retype new UNIX password: 

passwd: password updated successfully

Java 8 Installation

Ubuntu 18.04 comes with default Java 11 installation. First of, remove that Java version using the link here

Now to install follow the following steps:

  1. Add the following line to /etc/apt/sources.list:
#deb http://debian.opennms.org/ stable main

  1. Install GPG key of the repository:
#wget -O - http://debian.opennms.org/OPENNMS-GPG-KEY | sudo apt-key add -
  1. Update the package index:
#sudo apt-get update
  1. Install oracle-java8-installer deb package:
#sudo apt-get install oracle-java8-installer

Install F.lux

  1. Launch terminal (Ctrl+Alt+T) and run below commands one by one to get it from PPA:
sudo add-apt-repository ppa:nathan-renniewaldock/flux

Type in your password when it asks (no visual feedback when typing) and hit Enter to continue.

  1. Then update and install the GUI along with xflux daemon via commands:
sudo apt-get update

sudo apt-get install fluxgui
  1. (Optional) To remove the software, use Synaptic Package Manager or just run below command:
sudo apt-get remove fluxgui

Move Window Buttons ‘Min, Max, Close’ to Left in Ubuntu 18.04

  1. To get started, open Ubuntu Software, search for and install Gnome Tweaks.

  2. Then launch the Gnome Tweaks, and navigate to Windows tab. At the bottom, you can see the toggle to change the titlebar buttons placement.

That’s it. Enjoy!

Install Viber

  1. Open terminal in Ubuntu using CTRL+ALT+T.
  2. To enable Snap in your system, run below commands from terminal.
  3. To enable snap:
   sudo apt install snapd -y

To install Viber:

   sudo snap install viber-unofficial

After installation, you can find Viber in application menu. Viber needs to be installed in your mobile phone to use in Laptop or desktop in Linux. You can install Viber in your mobile phone using Playstore for Android.

To remove Viber from the system, run below commands for Ubuntu:

sudo snap remove viber-unofficial

Install Kazam for Screen recording

sudo add-apt-repository ppa:kazam-team/stable-series
sudo apt-get update

Type 'kazam' in your ubuntu menu and install from there

Install AnyDesk for remote access

Follow the following link and download 'Debian/ Ubuntu/ Mint' version of Anydesk from the dropdown.

Network Restart

sudo service network-manager restart 
sudo systemctl restart NetworkManager.service

Install VLC

sudo apt update
sudo apt install vlc

Yarn Installation

Follow the steps below to install Yarn on your Ubuntu 18.04 system:

  1. The first step is to enable the Yarn repository. Start by importing the repository’s GPG key using the following curl command:
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
  1. Add the Yarn APT repository to your system’s software repository list by typing:
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
  1. Once the repository is added to the system, update the package list and install Yarn, with:
sudo apt update
sudo apt install yarn
  1. To verify that Yarn installed successfully, run the following commands which will print the Yarn version number:
yarn --version

Git Flow Installation

sudo apt-get install git-flow

Edit lampp phpmyadmin root password

Edit the config.inc.php from the following location

$ nano /opt/lampp/phpmyadmin/config.inc.php

Look for the $cfg['Servers'][$i]['password'] = 'root'; and change the password as you please.

Find out port number of mysql used by phpmyadmin

mysql> SHOW GLOBAL VARIABLES LIKE 'PORT';

Install .tar.gz

tar xzf file.tar.gz

or

tar xzvf file.tar.gz

Install .run file

We will install the package through the Ubuntu command line, The Terminal. In order to open the Terminal, either use the Dash or the Ctrl+Alt+T shortcut. After the Terminal is open, you need to move to your Downloads folder to access the file.

Move to the Downloads folder by using the following command:

$ cd /home/[username]/Downloads

The installation package you downloaded needs to be made executable before it can be used further. Run the following command for this purpose:

$ chmod 755 [package name]

Example:

$ chmod 755 xampp-linux-x64-7.2.10-0-installer.run

Now the install package is in an executable form. After that, as a privileged root user, run the following command in order to launch the graphical setup wizard.

$ sudo ./[package name]

Example:

sudo ./xampp-linux-7.2.10-0-installer.run

Voila!

Install Xampp

Follow this link

If there's any problem whatsoever, use the following command

$ sudo chmod 755 /opt/lampp/phpmyadmin/config.inc.php

And, to start the xampp server

$ sudo /opt/lampp/lampp start 

For GUI

$ sudo ./opt/lampp/manager-linux-x64.run 

Now, after installation, change the root password via http://localhost/phpmyadmin. Go to User Accounts > Edit Setting (for root and localhost. Say your new password is root. After changing the password via phpmyadmin, you need to make changes at /opt/lampp/phpmyadmin/config.inc.php.

Look for the

$cfg['Servers'][$i]['password'] = '';

and update the line with your new password.

$cfg['Servers'][$i]['password'] = 'root';

Uninstall a package installed from snapcraft

$ sudo snap remove [package-name]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment