Deprecated: Function get_magic_quotes_gpc() is deprecated in /srv/marcgottlieb.com/wp-includes/load.php on line 926

Notice: Trying to access array offset on value of type bool in /srv/marcgottlieb.com/wp-includes/theme.php on line 2360

Deprecated: Function get_magic_quotes_gpc() is deprecated in /srv/marcgottlieb.com/wp-includes/formatting.php on line 4826

Deprecated: Function get_magic_quotes_gpc() is deprecated in /srv/marcgottlieb.com/wp-includes/formatting.php on line 4826

Deprecated: Function get_magic_quotes_gpc() is deprecated in /srv/marcgottlieb.com/wp-includes/formatting.php on line 4826

Deprecated: Function get_magic_quotes_gpc() is deprecated in /srv/marcgottlieb.com/wp-includes/formatting.php on line 4826

Deprecated: Function get_magic_quotes_gpc() is deprecated in /srv/marcgottlieb.com/wp-includes/formatting.php on line 4826

Deprecated: Function get_magic_quotes_gpc() is deprecated in /srv/marcgottlieb.com/wp-includes/formatting.php on line 4826

Deprecated: Function get_magic_quotes_gpc() is deprecated in /srv/marcgottlieb.com/wp-includes/formatting.php on line 4826

Deprecated: Function get_magic_quotes_gpc() is deprecated in /srv/marcgottlieb.com/wp-includes/formatting.php on line 4826
Linux Archives - Page 3 of 4 - Marc Gottlieb Consulting
Deprecated: Function get_magic_quotes_gpc() is deprecated in /srv/marcgottlieb.com/wp-includes/formatting.php on line 4826

Deprecated: Function get_magic_quotes_gpc() is deprecated in /srv/marcgottlieb.com/wp-includes/formatting.php on line 4826

Deprecated: Function get_magic_quotes_gpc() is deprecated in /srv/marcgottlieb.com/wp-includes/formatting.php on line 4826

Deprecated: Function get_magic_quotes_gpc() is deprecated in /srv/marcgottlieb.com/wp-includes/formatting.php on line 4826

Deprecated: Function get_magic_quotes_gpc() is deprecated in /srv/marcgottlieb.com/wp-includes/formatting.php on line 4826

Deprecated: Function get_magic_quotes_gpc() is deprecated in /srv/marcgottlieb.com/wp-includes/formatting.php on line 4826

Deprecated: Function get_magic_quotes_gpc() is deprecated in /srv/marcgottlieb.com/wp-includes/formatting.php on line 4826

Deprecated: Function get_magic_quotes_gpc() is deprecated in /srv/marcgottlieb.com/wp-includes/formatting.php on line 4826

Deprecated: Function get_magic_quotes_gpc() is deprecated in /srv/marcgottlieb.com/wp-includes/formatting.php on line 4826

Deprecated: Function get_magic_quotes_gpc() is deprecated in /srv/marcgottlieb.com/wp-includes/formatting.php on line 4826

10 More Quick Tips to Make Linux Networking Easier

10 More Quick Tips to Make Linux Networking Easier

http://ift.tt/2pYfpn5

If you either work on a Linux desktop, or administer a Linux server, there might be times when frustration sets in over networking issues. Although Linux has made significant advances over the years, there are still instances where the standard troubleshooting or optimizations won’t work. To that end, you need to have some tricks and tips up your sleeve to make your life easier.

Linux

Linux

via http://ift.tt/1Wf4iBh

May 8, 2017 at 10:18AM

How to run command or code in parallel in bash shell under Linux or Unix

How to run command or code in parallel in bash shell under Linux or Unix

http://ift.tt/2q8BulH

H

ow do I run commands in parallel in a bash shell script running under Linux or Unix-like operating system? How can I run multiple programs in parallel from a bash script?

You have various options to run programs or commands in parallel:

=> Use GNU/parallel or xargs command.

=> Use wait built-in command with &.

=> Use xargs command.

How to run multiple programs in parallel from a bash script in linux / unix?

Putting jobs in background

The syntax is:
command &
command arg1 arg2 &
custom_function &

OR
prog1 &
prog2 &
wait
prog3

In above code sample, prog1, and prog2 would be started in the background, and the shell would wait until those are completed before starting the next program named progr3.

Examples

In this following example run sleep command in the background:
$ sleep 60 &
$ sleep 90 &
$ sleep 120 &

To displays status of jobs in the current shell session run jobs command as follows:
$ jobs
Sample outputs:

[1]   Running                 sleep 60 &
[2]-  Running                 sleep 90 &
[3]+  Running                 sleep 120 &

Let us write a simple bash shell script:

#!/bin/bash
# Our custom function
cust_func(){
  echo "Do something $1 times..."
  sleep 1
}
# For loop 5 times
for i in {1..5}
do
	cust_func $i & # Put a function in the background
done
 
## Put all cust_func in the background and bash 
## would wait until those are completed 
## before displaying all done message
wait 
echo "All done"

#!/bin/bash
# Our custom function
cust_func(){
echo “Do something $1 times…”
sleep 1
}
# For loop 5 times
for i in {1..5}
do
cust_func $i & # Put a function in the background
done## Put all cust_func in the background and bash
## would wait until those are completed
## before displaying all done message
wait
echo “All done”

Let us say you have a text file as follows:
$ cat list.txt
Sample outputs:

http://ift.tt/2piFZq2
http://ift.tt/2pKEy69
http://ift.tt/2pj1KWo
http://ift.tt/2pKCco9
http://ift.tt/2piQTMf
http://ift.tt/2pKvOgu
http://ift.tt/2piKKjd
http://ift.tt/2pKAL96
http://ift.tt/2piLzIT
http://ift.tt/2pKlQfe
http://ift.tt/2piXVAI
http://ift.tt/2pKvtKT

To download all files in parallel using wget:

#!/bin/bash
# Our custom function
cust_func(){
  wget -q "$1"
}
 
while IFS= read -r url
do
        cust_func "$url" &
done < list.txt
 
wait
echo "All files are downloaded."

#!/bin/bash
# Our custom function
cust_func(){
wget -q “$1”
}while IFS= read -r url
do
cust_func “$url” &
done < list.txtwait
echo “All files are downloaded.”

GNU parallel examples

From the GNU project site:

GNU parallel is a shell tool for executing jobs in parallel using one or more computers. A job can be a single command or a small script that has to be run for each of the lines in the input. The typical input is a list of files, a list of hosts, a list of users, a list of URLs, or a list of tables.

The syntax is pretty simple:
parallel ::: prog1 prog2
For example, you can find all *.doc files and gzip (compress) it using the following syntax:
$ find . -type f -name '*.doc' | parallel gzip --best
$ find . -type f -name '*.doc.gz'

Our above wget example can be simplified using GNU parallel as follows:
$ cat list.txt | parallel -j 4 wget -q {}
OR
$ parallel -j 4 wget -q {} < list.txt

See also

Linux

Linux

via [RSS/Feed] nixCraft: Linux Tips, Hacks, Tutorials, And Ideas In Blog Format http://ift.tt/Awfi7s

May 5, 2017 at 06:02PM

When you delete a line of code that you thought was useless…

When you delete a line of code that you thought was useless…

http://ift.tt/2qGPeEj

Or when you run rm -rf / on Linux or Unix-like system 😉

rm-rf

rm-rf

Another gif showing the same issue:

Delete a block of code

Delete a block of code

Now, I am hitting u, u, u in vim to undo (ctrl-z in other IDE) like a maniac to get back that line or a code block. Lmao.

Linux

Linux

via [RSS/Feed] nixCraft: Linux Tips, Hacks, Tutorials, And Ideas In Blog Format http://ift.tt/Awfi7s

May 7, 2017 at 05:05PM

Graph Any Data with Cacti!

Graph Any Data with Cacti!

http://ift.tt/2qbLG9N

For the past few years, I’ve been trying to understand how to make graphs usingRRDtool (Round-Robin Database tool) after failing miserably to understand MRTG(Multi-Router Traffic Grapher) before that. The thing I like about RRDtoolis that it’s newer and supports a wider variety of data sources.

Linux

Linux

via LXer Linux News http://lxer.com/

April 27, 2017 at 04:43PM

How to install GoAccess web log analyzer with Nginx on Linux or Unix

How to install GoAccess web log analyzer with Nginx on Linux or Unix

http://ift.tt/2pLDvUM

G

oAccess is a real-time Apache/Nginx/Lighttpd web log analyzer and interactive viewer that runs in a terminal and provides fast and valuable HTTP statistics for system administrators that require a visual report on the fly. How do I install GoAccess on Ubuntu Linux server? How can I instal and use GoAccess on Linux or Unix-like system?

GoAccess is a free and open source real-time web log analyzer and interactive viewer that runs in a terminal in Linux/Unix/*BSD systems or through your browser. T

his tutorial shows how to install the GoAccess on Linux/Unix and how to use it on the *nix command line

.

Install GoAccess

You must install GoAccess as per your Linux or Unix distro.

Install GoAccess on Ubuntu Linux

Type the following apt-get command/apt command as follows:
$ sudo apt-get install goaccess
Sample outputs:

Fig.01: How to install GoAccess on Ubuntu Linux server
Fig.01: How to install GoAccess on Ubuntu Linux server

Install GoAccess on Debian Linux

Type the following apt-get command/apt command as follows:
$ sudo apt-get install goaccess

Install GoAccess on Debian Linux

Type the following apt-get command/apt command as follows:
$ sudo apt-get install goaccess

Install GoAccess on Alpine Linux

Type the following apk command as follows:
# apk add goaccess

Install GoAccess on CentOS Linux

First turn on the EPEL repo and type the following yum command as follows:
$ sudo yum install epel-release
$ sudo yum install goaccess

Install GoAccess on Fedora Linux

First turn on the EPEL repo and type the following dnf command as follows:
$ sudo dnf install epel-release
$ sudo dnf install goaccess

Install GoAccess on Arch Linux

Type the following pacman command as follows:
# pacman -S goaccess

Install GoAccess on FreeBSD UNIX

To install the port:
# cd /usr/ports/sysutils/goaccess/ && make install clean
OR To add the package:
# pkg install goaccess

Install GoAccess on macOS UNIX (Homebrew)

Type the following brew command:
$ brew install goaccess

Install GoAccess on OpenBSD UNIX

Type the following pkg_add command:
$ doas pkg_add goaccess

Installing GoAccess using source code method

Type the following command to download and compile GoAccess on Unix-like system:
$ cd /tmp
$ wget http://ift.tt/2oMTfXs
$ tar -zxvf goaccess-1.2.tar.gz
$ cd goaccess-1.2/
$ ./configure --enable-utf8 --enable-geoip=legacy && make
$ sudo make install

How do I use GoAccess?

The syntax is:
goaccess -f /path/to/nginx/access.log
goaccess -f /path/to/apache/access.log
goaccess -f /path/to/lighttpd/access.log
goaccess -f /path/to/lighttpd/access.log /path/to/lighttpd/access.log.1
zcat /path/to/nginx/access.log.*.gz | goaccess access.log -
goaccess [options] /path/to/lighttpd/access.log

Examples

Let us see some examples.

How can I see output on screen with a live report?

goaccess -f /var/log/nginx/access.log
You will be promoted to select “Log Format Configuration”:

Fig.02: Set the log-format for your log file
Fig.02: Set the log-format for your log file

Next you will see a report as follows:

Fig.03:  See an interactive report on screen
Fig.03: See an interactive report on screen

Important shortcut keys

You can use the following keys:

  • q – Quit the program.
  • h or ? – See help.
  • 0-9 and Shift + 0 – Set selected module to active.
  • j – Scroll down within expanded module.
  • k – Scroll up within expanded module.
  • c – Set or change scheme color.
  • ^f – Scroll forward one screen within active module.
  • ^b – Scroll backward one screen within active module.
  • TAB – Iterate modules (forward).
  • SHIFT + TAB – Iterate modules (backward).
  • s – Sort options for active module.
  • /Search – across all modules (regex allowed).
  • n – Find position of the next occurrence.
  • g – Move to the first item or top of screen.
  • G – move to the last item or bottom of screen.

How do I generate an HTML report?

The syntax is:
goaccess -f /var/log/nginx/access.log --log-format=COMBINED -o http://ift.tt/2oYHv05
Sample outputs:

Parsing... [669] [1112]

You can view report with your web-browser. Here is a sample report:
http://ift.tt/2oYOw13

How do I use goaccess over an ssh based session?

The syntax is:
$ ssh [email protected] 'cat /var/log/nginx/access.log'|goaccess --log-format=COMBINED -a -
$ ssh [email protected] 'cat /var/log/nginx/access.log'|goaccess --log-format=COMBINED -
$ ssh [email protected] 'cat /var/log/nginx/access.log'|goaccess --log-format=COMBINED -o http://ift.tt/2oYNodZ -

How do I view real time stats in browser?

Run it as follows:
$ goaccess -f access.log -o report.html --real-time-html --addr=192.168.1.254 --port=8022
See man page or project page for more info.

Linux

Linux

via [RSS/Feed] nixCraft: Linux Tips, Hacks, Tutorials, And Ideas In Blog Format http://ift.tt/Awfi7s

April 30, 2017 at 12:49PM

How to Install Invoice Ninja on Ubuntu 16.04

How to Install Invoice Ninja on Ubuntu 16.04

http://ift.tt/2oTY4um

How to Install Invoice Ninja on Ubuntu 16.04

Invoice Ninja is a web-based open source software for invoicing, payments, time tracking and much more. You can create Invoices online in seconds, interact with payments gateways like Stripe, PayPal, WePay, and others. Invoice Ninja can show you a live invoice preview in PDF format. You can change the company logo in templates easily yourself. Invoice Ninja is based on PHP, build with the Laravel Framework and can be installed on Linux and Windows.

In this tutorial, I will show you how to install Invoice Ninja on Ubuntu 16.04. I will use Nginx as the web server and MariaDB as Database system.

Prerequisite

  • Ubuntu 16.04 server.
  • Root privileges.

Step 1 – Install Nginx

In this step, we will install the Nginx web server. Connect to your server with your ssh root account (or login with another user and use ‘sudo -s’ to become root) and update the repository.

ssh [email protected]
apt-get update

Install Nginx with the apt command below:

apt-get install -y nginx

When the nginx installation is finished, start Nginx and add it to start at boot time.

systemctl start nginx
systemctl enable nginx

Make sure nginx is running. Check the port used by nginx, the default web server port is 80.

netstat -plntu

Nginx installed on Ubuntu 16.04

Step 2 – Install and Configure MariaDB Server

After installing Nginx, we need to install the package mariadb-server on the system. It’s available in the Ubuntu repository. Install mariadb-server and its dependencies with the command below.

apt-get install -y mariadb-server

When the installation is done, start the mariadb service and enable it to start at boot time with these systemctl commands.

systemctl restart mysql
systemctl enable mysql

MariaDB is started, now you can set the root password for mariadb with the command below.

mysql_secure_installation

Set your new MariaDB root password.

Set root password? [Y/n] Y
New password:
Re-enter new password:

Remove anonymous users? [Y/n] Y
Disallow root login remotely? [Y/n] Y
Remove test database and access to it? [Y/n] Y
Reload privilege tables now? [Y/n] Y

Next, try to connect with the mysql shell as root user.

mysql -u root -p
TYPE YOUR ROOT PASSWORD

You will see MySQL shell when everything worked correctly.

Now we need to create a new database and a new user for Invoice Ninja. I will create a new database named ‘ninjadb‘, a new user ‘ninja‘ with password ‘aqwe123‘. Please choose a different and secure password for your installation!

Create them with the mysql query below. Create a new database, create new user and password, grant database to the new user with a password.

create database ninjadb;
create user [email protected] identified by ‘aqwe123’;
grant all privileges on ninjadb.* to [email protected] identified by ‘aqwe123’;
flush privileges;

Install and Configure MariaDB for Invoice Ninja

MariaDB has been installed and a new database and user for Invoice Ninja were created.

Step 3 – Install and Configure PHP7.0-FPM

Invoice Ninja is based on PHP, so we need to install PHP to the system. We will use PHP7.0-FPM for this Invoice Ninja installation.

Install PHP7.0-FPM and other PHP extensions needed by Invoice Ninja with the command below.

apt-get install -y php7.0-fpm php7.0-gd php7.0-xml php7.0-mysql php7.0-zip php7.0-mbstring php7.0-mcrypt php7.0-curl php7.0-gmp

After the installation, go to the PHP configuration directory and edit the php.ini file.

cd /etc/php/7.0/
vim fpm/php.ini

Uncomment the CGI line below and change the value to 0.

cgi.fix_pathinfo=0

Save and exit.

Edit php.ini file in the cli directory.

vim cli/php.ini

Uncomment the CGI line below and change the value to 0.

cgi.fix_pathinfo=0

Save and exit.

Next, start PHP7.0-FPM and enable it to start at boot time.

systemctl restart php7.0-fpm
systemctl enable php7.0-fpm

By default, PHP7.0-FPM is running with a socket file, check it with the command below and you will see the PHP socket file as shown in the screenshot.

netstat -pl

Configure PHP7.0-FPM on Ubuntu 16.04

PHP7.0-FPM and all extensions needed by Invoice Ninja are installed.

Step 4 – Install and Configure Invoice Ninja

In this step, we will download and configure Invoice Ninja. First, install unzip on your system.

apt-get install -y unzip

Go to the ‘/var/www’ directory and download the Invoice Ninja source code with the wget command.

cd /var/www/
wget http://ift.tt/2p2Pzzr

Extract the Invoice Ninja zip file and go to the ‘ninja’ directory.

unzip ninja-v3.1.0.zip
cd ninja/

For the Laravel project, we need to install the composer dependency manager for PHP. It’s available in the Ubuntu repository, so we can install it with the apt command.

apt-get install -y composer

Next, install Invoice Ninja dependencies with the composer command below.

composer install –no-dev -o

  • –no-dev : Disables installation of require-dev packages
  • -o : Optimize autoloader during autoloader dump

When the dependency installation is done, copy the .env file and edit with vim.

cp .env.example .env
vim .env

Change the value of database settings below.

DB_DATABASE=ninjadb
DB_USERNAME=ninja
DB_PASSWORD=aqwe123

Save and exit.

environment setup for Invoice Ninja

Next, edit the database configuration in the config directory.

vim config/database.php

We are using MariaDB/MySQL database, go to the MySQL line 55.

‘database’  => env(‘DB_DATABASE’, ‘ninjadb’),
‘username’  => env(‘DB_USERNAME’, ‘ninja’),
‘password’  => env(‘DB_PASSWORD’, ‘aqwe123’),

Replace the password with the one that you have set for the ninja user!

Save and exit.

Invoice Ninja Database Configuration

All configuration files are edited. Next, migrate the database with the command below.

php artisan migrate

You will be asked to run the command, type ‘yes‘ and press Enter.

Invoice Ninja Migrate Database

Next, seed the database with all records.

php artisan db:seed

Type ‘yes‘ and press Enter to confirm.

Invoice Ninja Seed Tables

Generate a new application key for the Laravel project Invoice Ninja.

php artisan key:generate

You will see the application key.

Edit the app.php file with vim.

vim config/app.php

Go to the APP_KEY line 85 and paste the key we generated.

‘key’ => env(‘APP_KEY’, ‘base64:0o5QLWbNeDCNer064+600Hl8oJ20OPCIymadKJQ1RGo=’),

Save and exit.

Finally, change the owner of ‘/var/www/ninja‘ directory to ‘www-data‘ user and group.

cd /var/www/
chown -R www-data:www-data ninja/

Invoice Ninja is configured and ready for the installation.

Step 5 – Configure SSL and Virtual Host

In this step, we will generate an SSL Certificate file with the OpenSSL command and create new virtual host configuration for Invoice Ninja. If you are on a live server, you can use a free SSL from Let’s Encrypt instead of generating a self-signed SSL cert with OpenSSL.

Create a new ‘cert‘ directory for the SSL files.

mkdir -p /etc/nginx/cert/

Run the openssl command below to generate the certificate files.

openssl req -new -x509 -days 365 -nodes -out /etc/nginx/cert/ninja.crt -keyout /etc/nginx/cert/ninja.key

Change the permission of the certificate files to ‘600’.

chmod 600 /etc/nginx/cert/*

Generate SSL Certificate for Invoice Ninja

Next, go to the Nginx directory and create a new virtual host configuration file named ‘ninja‘.

cd /etc/nginx/
vim sites-available/ninja

Paste virtual host configuration below.

server {
    # Your Domain Name - hakase-labs.co
    listen      80;
    server_name ninja.co www.ninja.co;

    # Rewrite redirect to https
    add_header Strict-Transport-Security max-age=2592000;
    rewrite ^ https://$server_name$request_uri? permanent;
}

server {
    # Your Domain Name - hakase-labs.co
    listen      443 default;
    server_name ninja.co www.ninja.co;

    # Enable SSL for Invoice Ninja
    ssl on;
    ssl_certificate     /etc/nginx/cert/ninja.crt;
    ssl_certificate_key /etc/nginx/cert/ninja.key;
    ssl_session_timeout 5m;

    ssl_ciphers               'AES128+EECDH:AES128+EDH:!aNULL';
    ssl_protocols              TLSv1 TLSv1.1 TLSv1.2;
    ssl_prefer_server_ciphers on;

    # Invoice Ninja web root files
    root /var/www/ninja/public;

    index index.html index.htm index.php;

    charset utf-8;

    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

    location = /favicon.ico { access_log off; log_not_found off; }
    location = /robots.txt  { access_log off; log_not_found off; }

    # Access and Error Log for Invoice Ninja
    access_log  /var/log/nginx/ininja.access.log;
    error_log   /var/log/nginx/ininja.error.log;

    sendfile off;

    # Handle PHP Applications
    location ~ \.php$ {
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/run/php/php7.0-fpm.sock;
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_intercept_errors off;
        fastcgi_buffer_size 16k;
        fastcgi_buffers 4 16k;
    }

    location ~ /\.ht {
        deny all;
    }
}

Save and exit.

Enable the ninja virtual host and test the Nginx configuration, make sure there is no error.

ln -s /etc/nginx/sites-available/ninja /etc/nginx/sites-enabled/
nginx -t

Now restart the nginx web server.

systemctl restart nginx

Invoice Ninja Virtual Host Installed

The Invoice Ninja virtual host configuration is finished.

Step 6 – Finishing the Installation and Testing

Open your web browser and type in the Invoice Ninja URL: ninja.co. You will be redirected to the https connection and setup page.

Invoice Ninja Installation

Type in the Application Settings, Database Connection, Email Settings, User Details and check the Invoice Ninja TOS.

Invoice Ninja Installation Configuration setup

Click ‘Submit‘ and you will be redirected to the login page of Invoice Ninja.

Type in your email and password, then press ‘LOGIN‘.

You will see the Invoice Ninja Dashboard.

Invoice Ninja Admin Dashboard

Invoice Ninja Settings Page.

Invoice Ninja Setting Page

Invoice Ninja Installed with Nginx and MariaDB on Ubuntu 16.04.

Reference

Linux

Linux

via LXer Linux News http://lxer.com/

April 28, 2017 at 04:17PM

neofetch: Awesome system info bash script that supports Linux, MacOS, and Unix-like systems

neofetch: Awesome system info bash script that supports Linux, MacOS, and Unix-like systems

http://ift.tt/2qfEOHT

The neofetch command written in a bash shell. The main purpose of neofetch is to be used in screenshots to display other users what operating system or Linux distro you are using including theme, icons and more. This command shows info about your system next to an image, your operating system logo and other info. Neofetch version 3.1.0 has been released. Let us see how to install the latest version and use it.

Universals installation method

Type the following wget command to grab the latest tar ball:
$ wget http://ift.tt/2pjNcXo
Install it:
$ tar -zxvf 3.1.0.tar.gz
$ cd neofetch-3.1.0
$ sudo make install

Installing binary package on Ubuntu Linux 17.04+

Type the following apt command:
$ sudo apt install neofetch

Installing binary package on Debian Linux sid/stretch

Type the following apt-get command:
$ sudo apt-get install neofetch

Installing binary package on macOS (homebrew)

Type the following brew command:
$ brew install neofetch

How do I use neofetch?

Open the terminal app and type the command:
$ neofetch
$ neofetch options
$ neofetch --config off --bold off --colors 4 1 8 8 8 7

Sample outputs from macOS:

Fig.01: neofetch running on macOS
Fig.01: neofetch running on macOS

Sample outputs from Ubuntu Linux desktop:

Fig.02: neofetch running on Ubuntu
Fig.02: neofetch running on Ubuntu

See help for more info

Type the following command:
$ neofetch --help
$ neofetch --help | more

Usage: neofetch --option "value" --option "value"

Neofetch is a CLI system information tool written in BASH. Neofetch
displays information about your system next to an image, your OS logo,
or any ASCII file of your choice.

NOTE: Every launch flag has a config option.

Options:

INFO:
    --disable infoname          Allows you to disable an info line from appearing
                                in the output.

                                NOTE: You can supply multiple args. eg. 'neofetch --disable cpu gpu disk shell'

    --os_arch on/off            Hide/Show OS architecture.
    --speed_type type           Change the type of cpu speed to display.
                                Possible values: current, min, max, bios,
                                scaling_current, scaling_min, scaling_max

                                NOTE: This only supports Linux with cpufreq.

    --speed_shorthand on/off    Whether or not to show decimals in CPU speed.
    --cpu_shorthand type        Shorten the output of CPU
                                Possible values: name, speed, tiny, on, off
    --cpu_cores type            Whether or not to display the number of CPU cores
                                Possible values: logical, physical, off

                                NOTE: 'physical' doesn't work on BSD.

    --cpu_speed on/off          Hide/Show cpu speed.
    --cpu_temp C/F/off          Hide/Show cpu temperature.

                                NOTE: This only works on Linux and BSD.

                                NOTE: For FreeBSD-based systems, you need to enable coretemp kernel module.

    --distro_shorthand on/off   Shorten the output of distro (tiny, on, off)

                                NOTE: This option won't work in Windows (Cygwin)

    --kernel_shorthand on/off   Shorten the output of kernel

                                NOTE: This option won't work in BSDs (except PacBSD and PC-BSD)

    --uptime_shorthand on/off   Shorten the output of uptime (tiny, on, off)
    --refresh_rate on/off       Whether to display the refresh rate of each monitor
                                Unsupported on Windows
    --gpu_brand on/off          Enable/Disable GPU brand in output. (AMD/NVIDIA/Intel)
    --gpu_type type             Which GPU to display. (all, dedicated, integrated)

                                NOTE: This only supports Linux.

    --gtk_shorthand on/off      Shorten output of gtk theme/icons
    --gtk2 on/off               Enable/Disable gtk2 theme/font/icons output
    --gtk3 on/off               Enable/Disable gtk3 theme/font/icons output
    --shell_path on/off         Enable/Disable showing $SHELL path
    --shell_version on/off      Enable/Disable showing $SHELL version
    --disk_show value           Which disks to display.
                                Possible values: '/', '/dev/sdXX', '/path/to/mount point'

                                NOTE: Multiple values can be given. (--disk_show '/' '/dev/sdc1')

    --disk_subtitle type        What information to append to the Disk subtitle.
                                Takes: name, mount, dir

                                'name' shows the disk's name (sda1, sda2, etc)

                                'mount' shows the disk's mount point (/, /mnt/Local Disk, etc)

                                'dir' shows the basename of the disks's path. (/, Local Disk, etc)

    --ip_host url               URL to query for public IP
    --song_shorthand on/off     Print the Artist/Title on separate lines
    --install_time on/off       Enable/Disable showing the time in Install Date output.
    --install_time_format 12h/24h
                                Set time format in Install Date to be 12 hour or 24 hour.

TEXT FORMATTING:
    --colors x x x x x x        Changes the text colors in this order:
                                title, @, underline, subtitle, colon, info
    --underline on/off          Enable/Disable the underline.
    --underline_char char       Character to use when underlining title
    --bold on/off               Enable/Disable bold text

COLOR BLOCKS:
    --color_blocks on/off       Enable/Disable the color blocks
    --block_width num           Width of color blocks in spaces
    --block_height num          Height of color blocks in lines
    --block_range num num       Range of colors to print as blocks

BARS:
    --bar_char 'elapsed char' 'total char'
                                Characters to use when drawing bars.
    --bar_border on/off         Whether or not to surround the bar with '[]'
    --bar_length num            Length in spaces to make the bars.
    --bar_colors num num        Colors to make the bar.
                                Set in this order: elapsed, total
    --cpu_display mode          Bar mode.
                                Possible values: bar, infobar, barinfo, off
    --memory_display mode       Bar mode.
                                Possible values: bar, infobar, barinfo, off
    --battery_display mode      Bar mode.
                                Possible values: bar, infobar, barinfo, off
    --disk_display mode         Bar mode.
                                Possible values: bar, infobar, barinfo, off

IMAGE BACKEND:
    --backend backend           Which image backend to use.
                                Possible values: 'ascii', 'caca', 'catimg', 'jp2a', 'iterm2', 'off', 'sixel', 'tycat', 'w3m'
    --source source             Which image or ascii file to use.
                                Possible values: 'auto', 'ascii', 'wallpaper', '/path/to/img', '/path/to/ascii', '/path/to/dir/'
    --ascii source              Shortcut to use 'ascii' backend.
    --caca source               Shortcut to use 'caca' backend.
    --catimg source             Shortcut to use 'catimg' backend.
    --iterm2 source             Shortcut to use 'iterm2' backend.
    --jp2a source               Shortcut to use 'jp2a' backend.
    --sixel source              Shortcut to use 'sixel' backend.
    --termpix source            Shortcut to use 'termpix' backend.
    --tycat source              Shortcut to use 'tycat' backend.
    --w3m source                Shortcut to use 'w3m' backend.
    --off                       Shortcut to use 'off' backend.

    NOTE: 'source; can be any of the following: 'auto', 'ascii', 'wallpaper', '/path/to/img', '/path/to/ascii', '/path/to/dir/'

ASCII:
    --ascii_colors x x x x x x  Colors to print the ascii art
    --ascii_distro distro       Which Distro's ascii art to print

                                NOTE: Arch and Ubuntu have 'old' logo variants.

                                NOTE: Use 'arch_old' or 'ubuntu_old' to use the old logos.

                                NOTE: Ubuntu has flavor variants.

                                NOTE: Change this to 'Lubuntu', 'Xubuntu', 'Ubuntu-GNOME', 'Ubuntu-Studio' or 'Ubuntu-Budgie' to use the flavors.

                                NOTE: Alpine, Arch, Crux, Gentoo, OpenBSD, and Void have a smaller logo variant.

                                NOTE: Change this to 'alpine_small', 'arch_small', 'crux_small', 'gentoo_small', 'openbsd_small', and 'void_small' to use the small logos.

    --ascii_bold on/off         Whether or not to bold the ascii logo.
    -L, --logo                  Hide the info text and only show the ascii logo.

                                Possible values: bar, infobar, barinfo, off

IMAGE:
    --size 00px | --size 00%    How to size the image.
                                Possible values: auto, 00px, 00%, none
    --crop_mode mode            Which crop mode to use
                                Takes the values: normal, fit, fill
    --crop_offset value         Change the crop offset for normal mode.
                                Possible values: northwest, north, northeast,
                                west, center, east, southwest, south, southeast

    --xoffset px                How close the image will be to the left edge of the
                                window. This only works with w3m.
    --yoffset px                How close the image will be to the top edge of the
                                window. This only works with w3m.
    --bg_color color            Background color to display behind transparent image.
                                This only works with w3m.
    --gap num                   Gap between image and text.

                                NOTE: --gap can take a negative value which will move the text closer to the left side.

    --clean                     Delete cached files and thumbnails.

SCREENSHOT:
    -s, --scrot /path/to/img    Take a screenshot, if path is left empty the screen-
                                shot function will use $scrot_dir and $scrot_name.
    -su, --upload /path/to/img  Same as --scrot but uploads the scrot to a website.
    --image_host imgur/teknik   Website to upload scrots to.
    --scrot_cmd cmd             Screenshot program to launch

OTHER:
    --config /path/to/config    Specify a path to a custom config file
    --config none               Launch the script without a config file
    --help                      Print this text and exit
    --version                   Show neofetch version
    -v                          Display error messages.
    -vv                         Display a verbose log for error reporting.

DEVELOPER:
    --gen-man                   Generate a manpage for Neofetch in your PWD. (Requires GNU help2man)

See neofetch project home page for more info or to download the latest version.

Linux

Linux

via [RSS/Feed] nixCraft: Linux Tips, Hacks, Tutorials, And Ideas In Blog Format http://ift.tt/Awfi7s

April 26, 2017 at 02:37PM

Microsoft Will Block Desktop ‘Office’ Apps From ‘Office 365’ Services In 2020

Microsoft Will Block Desktop ‘Office’ Apps From ‘Office 365’ Services In 2020

http://ift.tt/2p8vk3J

An anonymous reader writes:
Microsoft is still encouraging businesses to rent their Office software, according to TechRadar. "In a bid to further persuade users of the standalone versions of Office to shift over to a cloud subscription (Office 365), Microsoft has announced that those who made a one-off purchase of an Office product will no longer get access to the business flavours of OneDrive and Skype come the end of the decade." PC World explains that in reality this affects very few users. "If you’ve been saving all of your Excel spreadsheets into your OneDrive for Business cloud, you’ll need to download and move them over to a personal subscription — or pony up for Office 365, as Microsoft really wants you to do." Microsoft is claiming that when customers connect to Office 365 services using a legacy version of Office, "they’re not enjoying all that the service has to offer. The IT security and reliability benefits and end user experiences in the apps is limited to the features shipped at a point in time. To ensure that customers are getting the most out of their Office 365 subscription, we are updating our system requirements." And in another blog post, they’re almost daring people to switch to Linux. "Providing over three years advance notice for this change to Office 365 system requirements for client connectivity gives you time to review your long-term desktop strategy, budget and plan for any change to your environment." In a follow-up comment, Microsoft’s Alistair Speirs explained that "There is still an option to get monthly desktop updates, but we are changing the 3x a year update channel to be 2x a year to align closer to Windows 10 update model. We are trying to strike the right balance between agile, ship-when-ready updates and enterprise needs of predictability, reliability and advanced notice to validate and prepare."



Share on Google+

Read more of this story at Slashdot.

Linux

Fun-Time Waste

via Slashdot https://slashdot.org/

April 22, 2017 at 10:08PM

How to execute sudo without password?

How to execute sudo without password?

http://ift.tt/2oKSbjy

If you are the only sysadmin or developer, you can skip password when you run sudo command. By default, sudo asks for the password. Here is how you can run sudo without having to enter your password.

I’m a new Unix system user. How do I use sudo command without a password on a Linux or Unix-like systems? I log in as tom@my-cloud-server-ip and disabled root login for ssh. After login, I need to run some commands as root user. I am the only sysadmin using my server. How do I run or execute sudo command without a password for a user named Tom under Debian/Ubuntu/CentOS Linux cloud server?

How to run sudo command without a password on a Linux or Unix

Linux

Linux

via [RSS/Feed] nixCraft: Linux Tips, Hacks, Tutorials, And Ideas In Blog Format http://ift.tt/Awfi7s

April 18, 2017 at 05:28PM


Deprecated: Function get_magic_quotes_gpc() is deprecated in /srv/marcgottlieb.com/wp-includes/formatting.php on line 4826

Deprecated: Function get_magic_quotes_gpc() is deprecated in /srv/marcgottlieb.com/wp-includes/formatting.php on line 4826

MENU


Deprecated: Function get_magic_quotes_gpc() is deprecated in /srv/marcgottlieb.com/wp-includes/formatting.php on line 4826

Deprecated: Function get_magic_quotes_gpc() is deprecated in /srv/marcgottlieb.com/wp-includes/formatting.php on line 2720

Deprecated: Function get_magic_quotes_gpc() is deprecated in /srv/marcgottlieb.com/wp-includes/formatting.php on line 2720

Deprecated: Function get_magic_quotes_gpc() is deprecated in /srv/marcgottlieb.com/wp-includes/formatting.php on line 4826

Deprecated: Function get_magic_quotes_gpc() is deprecated in /srv/marcgottlieb.com/wp-includes/formatting.php on line 4826

Deprecated: Function get_magic_quotes_gpc() is deprecated in /srv/marcgottlieb.com/wp-includes/formatting.php on line 4826

Deprecated: Function get_magic_quotes_gpc() is deprecated in /srv/marcgottlieb.com/wp-includes/formatting.php on line 4826

Deprecated: Function get_magic_quotes_gpc() is deprecated in /srv/marcgottlieb.com/wp-includes/formatting.php on line 4826

Deprecated: Function get_magic_quotes_gpc() is deprecated in /srv/marcgottlieb.com/wp-includes/formatting.php on line 4826

Deprecated: Function get_magic_quotes_gpc() is deprecated in /srv/marcgottlieb.com/wp-includes/formatting.php on line 4826