Go Lang on Debian

https://golang.org/doc/install

Screenshot at 2017-05-26 14-00-46

$ sudo cd /opt
$ sudo curl https://storage.googleapis.com/golang/go1.8.3.linux-amd64.tar.gz | tar zxf -
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 85.8M  100 85.8M    0     0  8626k      0  0:00:10  0:00:10 --:--:-- 10.2M
$ sudo nano /etc/profile

# Point to the local installation of golang.
export GOROOT=/opt/go

# Point to the location beneath which source and binaries are installed.
export GOPATH=$HOME/go

# Ensure that the binary-release is on your PATH.
export PATH=${PATH}:${GOROOT}/bin

# Ensure that compiled binaries are also on your PATH.
export PATH=${PATH}:${GOPATH}/bin
$ /etc/profile
$ go
Go is a tool for managing Go source code.

Usage:

	go command [arguments]

The commands are:

	build       compile packages and dependencies
	clean       remove object files
	doc         show documentation for package or symbol
	env         print Go environment information
	bug         start a bug report
	fix         run go tool fix on packages
	fmt         run gofmt on package sources
	generate    generate Go files by processing source
	get         download and install packages and dependencies
	install     compile and install packages and dependencies
	list        list packages
	run         compile and run Go program
	test        test packages
	tool        run specified go tool
	version     print Go version
	vet         run go tool vet on packages

Use "go help [command]" for more information about a command.

Additional help topics:

	c           calling between Go and C
	buildmode   description of build modes
	filetype    file types
	gopath      GOPATH environment variable
	environment environment variables
	importpath  import path syntax
	packages    description of package lists
	testflag    description of testing flags
	testfunc    description of testing functions

$ go version
go version go1.8.3 linux/amd64
$ go get github.com/golang/example/hello
$ cd go/src/github.com/golang/example/hello
$ go run hello.go 
Hello, Go examples!

https://debian-administration.org/article/727/Installing_the_Go_programming_language_on_Debian_GNU/Linux

Posted in Debian, Language | Leave a comment

Flask (Lightweight Python web framework) on mint

 

$ sudo apt search python-pip
p   python-pip                      - alternative Python package installer      
idA python-pip-whl                  - alternative Python package installer
$ sudo apt install python-pip
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Recommended packages:
  build-essential python-all-dev python-wheel
The following NEW packages will be installed:
  python-pip
0 upgraded, 1 newly installed, 0 to remove and 7 not upgraded.
Need to get 0 B/144 kB of archives.
After this operation, 635 kB of additional disk space will be used.
Selecting previously unselected package python-pip.
(Reading database ... 647024 files and directories currently installed.)
Preparing to unpack .../python-pip_8.1.1-2ubuntu0.4_all.deb ...
Unpacking python-pip (8.1.1-2ubuntu0.4) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up python-pip (8.1.1-2ubuntu0.4) ...
$ sudo apt show python-pip
Package: python-pip
Version: 8.1.1-2ubuntu0.4
Priority: optional
Section: universe/python
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 635 kB
Depends: ca-certificates, python-pip-whl (= 8.1.1-2ubuntu0.4), python:any (<< 2.8), python:any (>= 2.7.5-5~)
Recommends: build-essential, python-all-dev (>= 2.6), python-setuptools, python-wheel
Homepage: https://pip.pypa.io/en/stable/
Download-Size: 144 kB
APT-Manual-Installed: yes
APT-Sources: http://ubuntu-mirror.totbb.net/ubuntu xenial-updates/universe amd64 Packages
Description: alternative Python package installer
 pip is a replacement for easy_install, and is intended to be an improved
 Python package installer.  It integrates with virtualenv, doesn't do partial
 installs, can save package state for replaying, can install from non-egg
 sources, and can install from version control repositories.

N: There is 1 additional record. Please use the '-a' switch to see it
$ sudo pip install Flask
The directory '/home/nano/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/nano/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting Flask
  Downloading Flask-0.12.1-py2.py3-none-any.whl (82kB)
    100% |████████████████████████████████| 92kB 691kB/s 
Requirement already satisfied: itsdangerous>=0.21 in /usr/lib/python2.7/dist-packages (from Flask)
Collecting click>=2.0 (from Flask)
  Downloading click-6.7-py2.py3-none-any.whl (71kB)
    100% |████████████████████████████████| 71kB 3.6MB/s 
Requirement already satisfied: Werkzeug>=0.7 in /usr/lib/python2.7/dist-packages (from Flask)
Requirement already satisfied: Jinja2>=2.4 in /usr/lib/python2.7/dist-packages (from Flask)
Requirement already satisfied: MarkupSafe in /usr/lib/python2.7/dist-packages (from Jinja2>=2.4->Flask)
Installing collected packages: click, Flask
Successfully installed Flask-0.12.1 click-6.7
$ nano hello.py


#!/usr/bin/python

from flask import Flask
app = Flask(__name__)

@app.route("/")
def hello():
    return "Hello Nano!"

if __name__ == "__main__":
    app.run('0.0.0.0')


$ chmod +x hello.py
$ ./hello.py
 * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
$ curl http://localhost:5000
Hello Nano!

Screenshot at 2017-04-25 12-21-17

 

http://www.w3ii.com/th/flask/flask_quick_guide.html

https://jahchaisang.gitbooks.io/fra142-gui/content/chapter2-0.html

Posted in Framework, Language, Linux Mint | Leave a comment

Canon MX477 on Mint

Download : http://support-asia.canon-asia.com/contents/ASIA/EN/0100586902.html

$ tar -xf canon\ mx477/cnijfilter-mx470series-4.10-1-deb.tar.gz
$ cd canon\ mx477/cnijfilter-mx470series-4.10-1-deb/
$ sudo ./install.sh 
[sudo] password for nano: 
==================================================

Canon Inkjet Printer Driver
Version 4.10
Copyright CANON INC. 2001-2014

==================================================
Command executed = sudo dpkg -iG ./packages/cnijfilter-common_4.10-1_amd64.deb
(Reading database ... 642383 files and directories currently installed.)
Preparing to unpack .../cnijfilter-common_4.10-1_amd64.deb ...
Unpacking cnijfilter-common (4.10-1) over (4.10-1) ...
Setting up cnijfilter-common (4.10-1) ...
Processing triggers for libc-bin (2.23-0ubuntu7) ...
/sbin/ldconfig.real: /usr/lib/nvidia-375/libEGL.so.1 is not a symbolic link

/sbin/ldconfig.real: /usr/lib32/nvidia-375/libEGL.so.1 is not a symbolic link

Command executed = sudo dpkg -iG ./packages/cnijfilter-mx470series_4.10-1_amd64.deb
(Reading database ... 642383 files and directories currently installed.)
Preparing to unpack .../cnijfilter-mx470series_4.10-1_amd64.deb ...
Unpacking cnijfilter-mx470series (4.10-1) over (4.10-1) ...
Setting up cnijfilter-mx470series (4.10-1) ...
Processing triggers for libc-bin (2.23-0ubuntu7) ...
/sbin/ldconfig.real: /usr/lib/nvidia-375/libEGL.so.1 is not a symbolic link

/sbin/ldconfig.real: /usr/lib32/nvidia-375/libEGL.so.1 is not a symbolic link

/sbin/ldconfig.real: /usr/lib/nvidia-375/libEGL.so.1 is not a symbolic link

/sbin/ldconfig.real: /usr/lib32/nvidia-375/libEGL.so.1 is not a symbolic link


#=========================================================#
#  Register Printer
#=========================================================#
Next, register the printer to the computer.
Connect the printer, and then turn on the power.
To use the printer on the network, connect the printer to the network.
When the printer is ready, press the Enter key.
> 

#=========================================================#
#  Connection Method
#=========================================================#
 1) USB
 2) Network
Select the connection method.[1]2

Searching for printers...


#=========================================================#
#  Select Printer
#=========================================================#
Select the printer.
If the printer you want to use is not listed, select Update [0] to search again.
To cancel the process, enter [Q].
-----------------------------------------------------------
 0) Update
-----------------------------------------------------------
Target printers detected (MAC address  IP address)
1) Canon MX470 series (D8-49-2F-AF-9B-80 192.168.111.101)
-----------------------------------------------------------
Currently selected:[1] Canon MX470 series (D8-49-2F-AF-9B-80 192.168.111.101)
Enter the value. [1]

#=========================================================#
#  Register Printer
#=========================================================#
Enter the printer name.[MX470LAN-1]MX477
Command executed = sudo /usr/sbin/lpadmin -p MX477 -P /usr/share/cups/model/canonmx470.ppd -v cnijbe://Canon/?port=net&serial=D8-49-2F-AF-9B-80 -E

#=========================================================#
#  Set as Default Printer
#=========================================================#
Do you want to set this printer as the default printer?
Enter [y] for Yes or [n] for No.[y]

#=========================================================#
Installation has been completed.
Printer Name : MX477
Select this printer name for printing.
#=========================================================#

Screenshot at 2017-04-18 15-42-11

 

 

Download : http://support-asia.canon-asia.com/contents/ASIA/EN/0100587102.html

$ tar -xf scangearmp-mx470series-2.30-1-deb.tar.gz
$ cd scangearmp-mx470series-2.30-1-deb
$ sudo ./install.sh 
[sudo] password for nano: 
==================================================

ScanGear MP
Version 2.30
Copyright CANON INC. 2007-2014

==================================================
Command executed = sudo dpkg -iG ./packages/scangearmp-common_2.30-1_amd64.deb
Selecting previously unselected package scangearmp-common.
(Reading database ... 642383 files and directories currently installed.)
Preparing to unpack .../scangearmp-common_2.30-1_amd64.deb ...
Unpacking scangearmp-common (2.30-1) ...
Setting up scangearmp-common (2.30-1) ...
Processing triggers for libc-bin (2.23-0ubuntu7) ...
/sbin/ldconfig.real: /usr/lib/nvidia-375/libEGL.so.1 is not a symbolic link

/sbin/ldconfig.real: /usr/lib32/nvidia-375/libEGL.so.1 is not a symbolic link

Command executed = sudo dpkg -iG ./packages/scangearmp-mx470series_2.30-1_amd64.deb
Selecting previously unselected package scangearmp-mx470series.
(Reading database ... 642410 files and directories currently installed.)
Preparing to unpack .../scangearmp-mx470series_2.30-1_amd64.deb ...
Unpacking scangearmp-mx470series (2.30-1) ...
Setting up scangearmp-mx470series (2.30-1) ...
Processing triggers for libc-bin (2.23-0ubuntu7) ...
/sbin/ldconfig.real: /usr/lib/nvidia-375/libEGL.so.1 is not a symbolic link

/sbin/ldconfig.real: /usr/lib32/nvidia-375/libEGL.so.1 is not a symbolic link

Installation has been completed.

$ scangearmp

Screenshot at 2017-04-16 23-27-48

Screenshot at 2017-04-16 23-38-06

Posted in Linux Mint | Leave a comment

Yii2 via composer and highcharts extension on mint

$ curl -sS https://getcomposer.org/installer | php
$ sudo mv composer.phar /usr/local/bin/composer
$ composer global require "fxp/composer-asset-plugin:^1.2.0"
Changed current directory to /home/adull/.composer
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
  - Installing fxp/composer-asset-plugin (v1.3.0): Loading from cache
Writing lock file
Generating autoload files
$ composer install
Composer could not find a composer.json file in /home/adull/Documents/html/yii/composer
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
$ composer create-project --prefer-dist yiisoft/yii2-app-basic basic
Installing yiisoft/yii2-app-basic (2.0.11)
  - Installing yiisoft/yii2-app-basic (2.0.11): Loading from cache
Created project in basic
Loading composer repositories with package information
Updating dependencies (including require-dev)
Reading bower.json of bower-asset/punycode (v1.3.0)       
Could not fetch https://api.github.com/repos/bestiejs/punycode.js/contents/bower.json?ref=40e15ef43a44fdcb2b60fb631384168ef8e0181f, please create a GitHub OAuth token to go over the API rate limit
Head to https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+nano+2017-03-31+1343
to retrieve a token. It will be stored in "/home/adull/.composer/auth.json" for future use by Composer.
Token (hidden): 

https://github.com/settings/tokens

screencapture-github-settings-tokens-new-1490945930695

token

Token stored successfully.
Reading bower.json of bower-asset/jquery.inputmask (3.1.56)
Reading bower.json of bower-asset/jquery.inputmask (3.1.55)

Reading bower.json of bower-asset/jquery.inputmask (3.1.53)
Reading bower.json of bower-asset/jquery (1.7.2)           
Package operations: 59 installs, 0 updates, 0 removals  
  - Installing yiisoft/yii2-composer (2.0.5): Downloading (100%)         
  - Installing swiftmailer/swiftmailer (v5.4.6): Downloading (100%)         
  - Installing bower-asset/jquery (2.2.4): Downloading (100%)         
  - Installing bower-asset/yii2-pjax (v2.0.5): Downloading (100%)         
  - Installing bower-asset/punycode (v1.3.2): Downloading (100%)         
  - Installing cebe/markdown (1.1.1): Downloading (100%)         
  - Installing ezyang/htmlpurifier (v4.9.2): Downloading (100%)         
  - Installing bower-asset/jquery.inputmask (3.3.4): Downloading (100%)         
  - Installing yiisoft/yii2 (2.0.11.2): Downloading (100%)         
  - Installing yiisoft/yii2-swiftmailer (2.0.6): Downloading (100%)         
  - Installing bower-asset/bootstrap (v3.3.7): Downloading (100%)         
  - Installing yiisoft/yii2-bootstrap (2.0.6): Downloading (100%)         
  - Installing yiisoft/yii2-debug (2.0.9): Downloading (100%)         
  - Installing bower-asset/typeahead.js (v0.11.1): Downloading (100%)         
  - Installing phpspec/php-diff (v1.1.0): Downloading (100%)         
  - Installing yiisoft/yii2-gii (2.0.5): Downloading (100%)         
  - Installing fzaninotto/faker (v1.6.0): Downloading (100%)         
  - Installing yiisoft/yii2-faker (2.0.3): Downloading (100%)         
  - Installing psr/log (1.0.2): Downloading (100%)         
  - Installing symfony/debug (v3.2.6): Downloading (100%)         
  - Installing symfony/polyfill-mbstring (v1.3.0): Downloading (100%)         
  - Installing symfony/console (v3.2.6): Downloading (100%)         
  - Installing stecman/symfony-console-completion (0.7.0): Downloading (100%)         
  - Installing sebastian/diff (1.4.1): Downloading (100%)         
  - Installing sebastian/recursion-context (2.0.0): Downloading (100%)         
  - Installing sebastian/exporter (2.0.0): Downloading (100%)         
  - Installing sebastian/comparator (1.2.4): Downloading (100%)         
  - Installing behat/gherkin (v4.4.5): Downloading (100%)         
  - Installing symfony/dom-crawler (v3.2.6): Downloading (100%)         
  - Installing symfony/css-selector (v3.2.6): Downloading (100%)         
  - Installing symfony/browser-kit (v3.2.6): Downloading (100%)         
  - Installing symfony/yaml (v3.2.6): Downloading (100%)         
  - Installing symfony/event-dispatcher (v3.2.6): Downloading (100%)         
  - Installing symfony/finder (v3.2.6): Downloading (100%)         
  - Installing psr/http-message (1.0.1): Downloading (100%)         
  - Installing guzzlehttp/psr7 (1.4.2): Downloading (100%)         
  - Installing sebastian/version (2.0.1): Downloading (100%)         
  - Installing sebastian/environment (2.0.0): Downloading (100%)         
  - Installing sebastian/code-unit-reverse-lookup (1.0.1): Downloading (100%)         
  - Installing phpunit/php-token-stream (1.4.11): Downloading (100%)         
  - Installing phpunit/php-text-template (1.2.1): Downloading (100%)         
  - Installing phpunit/php-file-iterator (1.4.2): Downloading (100%)         
  - Installing phpunit/php-code-coverage (4.0.7): Downloading (100%)         
  - Installing sebastian/resource-operations (1.0.0): Downloading (100%)         
  - Installing sebastian/object-enumerator (2.0.1): Downloading (100%)         
  - Installing sebastian/global-state (1.1.1): Downloading (100%)         
  - Installing doctrine/instantiator (1.0.5): Downloading (100%)         
  - Installing phpunit/phpunit-mock-objects (3.4.3): Downloading (100%)         
  - Installing phpunit/php-timer (1.0.9): Downloading (100%)         
  - Installing webmozart/assert (1.2.0): Downloading (100%)         
  - Installing phpdocumentor/reflection-common (1.0): Downloading (100%)         
  - Installing phpdocumentor/type-resolver (0.2.1): Downloading (100%)         
  - Installing phpdocumentor/reflection-docblock (3.1.1): Downloading (100%)         
  - Installing phpspec/prophecy (v1.7.0): Downloading (100%)         
  - Installing myclabs/deep-copy (1.6.0): Downloading (100%)         
  - Installing phpunit/phpunit (5.7.17): Downloading (100%)         
  - Installing codeception/base (2.2.10): Downloading (100%)         
  - Installing codeception/verify (0.3.3): Downloading (100%)         
  - Installing codeception/specify (0.4.6): Downloading (100%)         
symfony/console suggests installing symfony/filesystem ()
symfony/console suggests installing symfony/process ()
symfony/browser-kit suggests installing symfony/process ()
symfony/event-dispatcher suggests installing symfony/dependency-injection ()
symfony/event-dispatcher suggests installing symfony/http-kernel ()
phpunit/php-code-coverage suggests installing ext-xdebug (^2.5.1)
sebastian/global-state suggests installing ext-uopz (*)
phpunit/phpunit-mock-objects suggests installing ext-soap (*)
phpunit/phpunit suggests installing phpunit/php-invoker (~1.1)
phpunit/phpunit suggests installing ext-xdebug (*)
codeception/base suggests installing flow/jsonpath (For using JSONPath in REST module)
codeception/base suggests installing phpseclib/phpseclib (for SFTP option in FTP Module)
codeception/base suggests installing league/factory-muffin (For DataFactory module)
codeception/base suggests installing league/factory-muffin-faker (For Faker support in DataFactory module)
codeception/base suggests installing symfony/phpunit-bridge (For phpunit-bridge support)
Writing lock file
Generating autoload files
> yii\composer\Installer::postCreateProject
chmod('runtime', 0777)...done.
chmod('web/assets', 0777)...done.
chmod('yii', 0755)...done.
$ cd basic
$ ./yii serve -p=8888

Screenshot at 2017-03-31 14-31-18

Install yii2-highcharts Extensions

$ cd basic
$ composer require --prefer-dist miloschuman/yii2-highcharts-widget "dev-master"
./composer.json has been updated
The "extra.asset-installer-paths" option is deprecated, use the "config.fxp-asset.installer-paths" option
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 2 installs, 0 updates, 0 removals                                                    
  - Installing bower-asset/highcharts (v5.0.10): Downloading (100%)         
  - Installing miloschuman/yii2-highcharts-widget (dev-master ba5e5c4): Downloading (100%)         
Writing lock file
Generating autoload files

https://github.com/miloschuman/yii2-highcharts

$ nano basic/assets/HighchartsAsset.php

<?php
namespace app\assets;

use yii\web\AssetBundle;

class HighchartsAsset extends AssetBundle
{
 public $sourcePath = '@bower/highcharts';
 public $css = [];
 public $js = [
 'highcharts.js',
 'highcharts-more.js',
 ];
 
 public $depends = [
 'yii\web\JqueryAsset'
 ];
}
?>
$ nano basic/controllers/HighchartsController.php

<?php
namespace app\controllers;

use yii\web\Controller;

class HighchartsController extends Controller
{
 public function actionIndex()
 {
 return $this->render('index');
 }
}
?>
$ nano basic/views/highcharts/index.php

<?php
use app\assets\HighchartsAsset;

HighchartsAsset::register($this);
$this->title = 'Highcharts Test';
?>

<?php $this->registerJs(" $(function () { $('#my-chart').highcharts({ title: { text: 'Monthly Average Temperature', x: -20 //center }, subtitle: { text: 'Source: WorldClimate.com', x: -20 }, xAxis: { categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] }, yAxis: { title: { text: 'Temperature (°C)' }, plotLines: [{ value: 0, width: 1, color: '#808080' }] }, tooltip: { valueSuffix: '°C' }, legend: { layout: 'vertical', align: 'right', verticalAlign: 'middle', borderWidth: 0 }, series: [{ name: 'Tokyo', data: [7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6] }, { name: 'New York', data: [-0.2, 0.8, 5.7, 11.3, 17.0, 22.0, 24.8, 24.1, 20.1, 14.1, 8.6, 2.5] }, { name: 'Berlin', data: [-0.9, 0.6, 3.5, 8.4, 13.5, 17.0, 18.6, 17.9, 14.3, 9.0, 3.9, 1.0] }, { name: 'London', data: [3.9, 4.2, 5.7, 8.5, 11.9, 15.2, 17.0, 16.6, 14.2, 10.3, 6.6, 4.8] }] }); }); ") ?>
 Screenshot at 2017-04-07 15-14-23

http://localhost/yii/composer/basic/web/index.php?r=highcharts

Screenshot at 2017-04-07 15-08-20

Posted in Framework, Linux Mint | Leave a comment

NginX php-fpm upload max file size

$ sudo nano /etc/php5/fpm/php.ini

upload_max_filesize = 300M
post_max_size = 300M
$ sudo nano /etc/nginx/sites-available/default


        server_name 127.0.0.1;

        client_body_in_file_only clean;
        client_body_buffer_size 32K;
        client_max_body_size 300M;
        sendfile on;
        send_timeout 300s;
$ service php7.0-fpm reload
$ service nginx reload

or
$ sudo /etc/init.d/php7.0-fpm restart
$ sudo /etc/init.d/nginx restart

Screenshot at 2017-03-30 12-08-44

Posted in Debian, Linux Mint | Leave a comment

Update GPG key for Nginx on Debian

$ aptitude update

W: GPG error: http://nginx.org jessie InRelease: The following signatures were invalid: KEYEXPIRED 1471427554
$ apt-key list

pub   2048R/7BD9BF62 2011-08-19 [expired: 2016-08-17]
uid                  nginx signing key <signing-key@nginx.com>
$ curl -O https://nginx.org/keys/nginx_signing.key && apt-key add ./nginx_signing.key

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1561  100  1561    0     0    637      0  0:00:02  0:00:02 --:--:--   637
OK
$ apt-key list

pub   2048R/7BD9BF62 2011-08-19 [expires: 2024-06-14]
uid                  nginx signing key <signing-key@nginx.com>

 

 

https://www.nginx.com/blog/updating-gpg-key-nginx-products/

Posted in Debian | Leave a comment

Change NIC Name on Mint

screenshot-at-2017-01-18-19-44-28

$ ifconfig
enp3s0    Link encap:Ethernet  HWaddr e8:11:32:2d:43:f2  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:209 errors:0 dropped:0 overruns:0 frame:0
          TX packets:209 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1 
          RX bytes:17092 (17.0 KB)  TX bytes:17092 (17.0 KB)

wlp2s0b1  Link encap:Ethernet  HWaddr 00:1b:b1:ac:50:4d  
          inet addr:192.168.111.102  Bcast:192.168.111.255  Mask:255.255.255.0
          inet6 addr: fe80::5d55:d09:d091:db05/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2231 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1463 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2710207 (2.7 MB)  TX bytes:139432 (139.4 KB)
$ sudo nano /etc/default/grub

GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

to

GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0"
$ sudo grub-mkconfig -o /boot/grub/grub.cfg

Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-4.4.0-59-generic
Found initrd image: /boot/initrd.img-4.4.0-59-generic
Found linux image: /boot/vmlinuz-4.4.0-53-generic
Found initrd image: /boot/initrd.img-4.4.0-53-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
done

if fix IP Address

$ sudo nano /etc/network/interfaces

auto enp3s0
iface enp3s0 inet static
           address 192.168.111.1
           netmask 255.255.255.0
           dns-nameservers 192.168.111.1
           dns-nameservers 8.8.4.4
           gateway 192.168.111.100

to

auto eth0
iface eth0 inet static
           address 192.168.111.1
           netmask 255.255.255.0
           dns-nameservers 192.168.111.1
           dns-nameservers 8.8.4.4
           gateway 192.168.111.100



Reboot

$ sudo reboot
$ ifconfig

eth0      Link encap:Ethernet  HWaddr e8:11:32:2d:43:f2  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:211 errors:0 dropped:0 overruns:0 frame:0
          TX packets:211 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1 
          RX bytes:16488 (16.4 KB)  TX bytes:16488 (16.4 KB)

wlan0     Link encap:Ethernet  HWaddr 00:1b:b1:ac:50:4d  
          inet addr:192.168.111.102  Bcast:192.168.111.255  Mask:255.255.255.0
          inet6 addr: fe80::5581:d3e0:8eac:b1d1/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:943 errors:0 dropped:0 overruns:0 frame:0
          TX packets:934 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:665249 (665.2 KB)  TX bytes:145824 (145.8 KB)

screenshot-at-2017-01-18-20-45-16

Posted in Linux Mint | Leave a comment