How to Delete Root Mails (Mailbox) File in Linux

‘,
enableHover: false,
enableTracking: true,
buttons: { twitter: {via: ‘tecmint’}},
click: function(api, options){
api.simulateClick();
api.openPopup(‘twitter’);
}
});
jQuery(‘#facebook’).sharrre({
share: {
facebook: true
},
template: ‘{total}’,
enableHover: false,
enableTracking: true,
click: function(api, options){
api.simulateClick();
api.openPopup(‘facebook’);
}
});
jQuery(‘#googleplus’).sharrre({
share: {
googlePlus: true
},
template: ‘{total}’,
enableHover: false,
enableTracking: true,
urlCurl: ‘https://www.tecmint.com/wp-content/themes/tecmint/js/sharrre.php’,
click: function(api, options){
api.simulateClick();
api.openPopup(‘googlePlus’);
}
});
jQuery(‘#linkedin’).sharrre({
share: {
linkedin: true
},
template: ‘{total}’,
enableHover: false,
enableTracking: true,
buttons: {
linkedin: {
description: ‘How to Delete Root Mails (Mailbox) File in Linux’,media: ‘https://www.tecmint.com/wp-content/uploads/2018/02/Delete-Root-User-Emails-in-Linux.png’ }
},
click: function(api, options){
api.simulateClick();
api.openPopup(‘linkedin’);
}
});
// Scrollable sharrre bar, contributed by Erik Frye. Awesome!
var shareContainer = jQuery(“.sharrre-container”),
header = jQuery(‘#header’),
postEntry = jQuery(‘.entry’),
$window = jQuery(window),
distanceFromTop = 20,
startSharePosition = shareContainer.offset(),
contentBottom = postEntry.offset().top + postEntry.outerHeight(),
topOfTemplate = header.offset().top;
getTopSpacing();
shareScroll = function(){
if($window.width() > 719){ var scrollTop = $window.scrollTop() + topOfTemplate,
stopLocation = contentBottom – (shareContainer.outerHeight() + topSpacing);
if(scrollTop > stopLocation){
shareContainer.offset({top: contentBottom – shareContainer.outerHeight(),left: startSharePosition.left});
}
else if(scrollTop >= postEntry.offset().top-topSpacing){
shareContainer.offset({top: scrollTop + topSpacing, left: startSharePosition.left});
}else if(scrollTop 1024)
topSpacing = distanceFromTop + jQuery(‘.nav-wrap’).outerHeight();
else
topSpacing = distanceFromTop;
}
});
]]>

LibreOffice 6.0 Released – Install on RHEL/CentOS/Fedora and Debian/Ubuntu/Linux Mint

LibreOffice is an open source and much powerful personal productivity office suit for Linux, Windows & Mac, that provides feature rich functions for word document, data processing, spreadsheets, presentation, drawing, Calc, Math and much more. LibreOffice has large number of satisfied users across the globe with almost 120 million downloads as of now. It supports more than 110 languages and runs on all major operating systems.

The Document Foundation team proudly announced the first major release of LibreOffice 6.0 on January 31, 2018, is now available for all major platforms including Linux, Windows and Mac OS.

This new update features a large number of exciting new features, performance and improvements and is targeted to all kinds of users, but especially appealing for enterprise, early adopters and power users.

There are many other changes and features included in the newest LibreOffice 6.0 – for a complete list of new features, see the release announcement page.

LibreOffice 6.0 Requirements

  1. Kernel 2.6.18 or higher version
  2. glibc2 version 2.5 or higher version
  3. gtk version 2.10.4 or higher version
  4. Minimum 256MB and recommended 512MB RAM
  5. 1.55GB available Hard disk space
  6. Desktop (Gnome or KDE)

Install LibreOffice 6.0 on Linux


The installation instructions provided here are for LibreOffice 6.0 using language US English on a 64-Bit system. For 32-Bit systems, there will be minor differences in directory names, but the installation process is same and hope the installation instructions provide here are not so difficult.

Step 1: Downloading LibreOffice 6.0

Select the package for download based on your system bit (i.e. for a 32-bit or 64-bit) using Wget command.

For RHEL/CentOS/Fedora
# cd /tmp
---------------------------- On 32-bit Systems ---------------------------- # wget http://download.documentfoundation.org/libreoffice/stable/6.0.0/rpm/x86/LibreOffice_6.0.0_Linux_x86_rpm.tar.gz
---------------------------- On 64-bit Systems ---------------------------- # wget http://download.documentfoundation.org/libreoffice/stable/6.0.0/rpm/x86_64/LibreOffice_6.0.0_Linux_x86-64_rpm.tar.gz

Download LibreOffice 6.0 on CentOS 7

[[email protected] ~]# wget http://download.documentfoundation.org/libreoffice/stable/6.0.0/rpm/x86_64/LibreOffice_6.0.0_Linux_x86-64_rpm.tar.gz
--2018-02-01 01:11:08-- http://download.documentfoundation.org/libreoffice/stable/6.0.0/rpm/x86_64/LibreOffice_6.0.0_Linux_x86-64_rpm.tar.gz
Resolving download.documentfoundation.org (download.documentfoundation.org)... 89.238.68.185, 2a00:1828:a012:185::1
Connecting to download.documentfoundation.org (download.documentfoundation.org)|89.238.68.185|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://ftp.gwdg.de/pub/tdf/libreoffice/stable/6.0.0/rpm/x86_64/LibreOffice_6.0.0_Linux_x86-64_rpm.tar.gz [following]
--2018-02-01 01:11:09-- https://ftp.gwdg.de/pub/tdf/libreoffice/stable/6.0.0/rpm/x86_64/LibreOffice_6.0.0_Linux_x86-64_rpm.tar.gz
Resolving ftp.gwdg.de (ftp.gwdg.de)... 134.76.12.6, 2001:638:60f:110::1:2
Connecting to ftp.gwdg.de (ftp.gwdg.de)|134.76.12.6|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 213537364 (204M) [application/octet-stream]
Saving to: ‘LibreOffice_6.0.0_Linux_x86-64_rpm.tar.gz’
100%[=================================================================================================================================>] 21,35,37,364 310KB/s in 15m 35s
2018-02-01 01:26:46 (223 KB/s) - ‘LibreOffice_6.0.0_Linux_x86-64_rpm.tar.gz’ saved [213537364/213537364]
For Debian/Ubuntu/LinuxMint
---------------------------- On 32-bit Systems ---------------------------- $ wget http://download.documentfoundation.org/libreoffice/stable/6.0.0/deb/x86/LibreOffice_6.0.0_Linux_x86_deb.tar.gz
---------------------------- On 64-bit Systems ---------------------------- $ wget http://download.documentfoundation.org/libreoffice/stable/6.0.0/deb/x86_64/LibreOffice_6.0.0_Linux_x86-64_deb.tar.gz

Download LibreOffice 6.0 on Ubuntu

tecmint ~ wget http://download.documentfoundation.org/libreoffice/stable/6.0.0/deb/x86_64/LibreOffice_6.0.0_Linux_x86-64_deb.tar.gz
--2018-02-01 11:57:23-- http://download.documentfoundation.org/libreoffice/stable/6.0.0/deb/x86_64/LibreOffice_6.0.0_Linux_x86-64_deb.tar.gz
Resolving download.documentfoundation.org (download.documentfoundation.org)... 89.238.68.185
Connecting to download.documentfoundation.org (download.documentfoundation.org)|89.238.68.185|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://ftp.gwdg.de/pub/tdf/libreoffice/stable/6.0.0/deb/x86_64/LibreOffice_6.0.0_Linux_x86-64_deb.tar.gz [following]
--2018-02-01 11:57:23-- https://ftp.gwdg.de/pub/tdf/libreoffice/stable/6.0.0/deb/x86_64/LibreOffice_6.0.0_Linux_x86-64_deb.tar.gz
Resolving ftp.gwdg.de (ftp.gwdg.de)... 134.76.12.6
Connecting to ftp.gwdg.de (ftp.gwdg.de)|134.76.12.6|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 213964181 (204M) [application/octet-stream]
Saving to: ‘LibreOffice_6.0.0_Linux_x86-64_deb.tar.gz’
LibreOffice_6.0.0_Linux_x86-64_deb.tar.gz 100%[========================================================================================>] 204.05M 319KB/s in 15m 17s 2018-02-01 12:12:41 (228 KB/s) - ‘LibreOffice_6.0.0_Linux_x86-64_deb.tar.gz’ saved [213964181/213964181]

Step 2: Removing Old LibreOffice or OpenOffice Versions

If any previously installed LibreOffice or OpenOffice versions you have, remove it using following command.

# yum remove openoffice* libreoffice* [on RedHat based Systems]
Remove Old LibreOffice 4 on CentOS

Remove Old LibreOffice 4 on CentOS

$ sudo apt-get remove openoffice* libreoffice* [On Debian based Systems]
Remove LibreOffice 4 on Ubuntu

Remove LibreOffice 4 on Ubuntu

Step 3: Extracting LibreOffice 6.0 Package

After downloading the LibreOffice 6.0 package, use tar command to extract it under /tmp directory or in a directory of your choice.

On RHEL/CentOS/Fedora
# tar -xvf LibreOffice_6.0.0_Linux_x86_rpm.tar.gz [On 32-Bit Systems] # tar -xvf LibreOffice_6.0.0_Linux_x86-64_rpm.tar.gz [On 64-Bit Systems] 
On Debian/Ubuntu/Linux Mint
$ tar -xvf LibreOffice_6.0.0_Linux_x86_deb.tar.gz [On 32-Bit Systems] $ tar -xvf LibreOffice_6.0.0_Linux_x86-64_deb.tar.gz [On 64-Bit Systems] 

Step 4: Installing LibreOffice 6.0 Package

After extracting the package, you will get a directory and under this there will be a sub-directory called RPMS. Now, run the following command to install it.

On RHEL/CentOS/Fedora
## For 32 Bit OS ##
# cd /tmp/LibreOffice_6.0.0.3_Linux_x86_rpm/RPMS/
# yum localinstall *.rpm
OR
# dnf install *.rpm [On Fedora 23+ versions]
## For 64 Bit OS ##
# cd /tmp/LibreOffice_6.0.0.3_Linux_x86-64_rpm/RPMS/
# yum localinstall *.rpm
OR
# dnf install *.rpm [On Fedora 23+ versions]

Installing LibreOffice 6.0 on CentOS 7

[[email protected] RPMS]# yum localinstall *.rpm
Dependencies Resolved
============================================================================================================================================================================
Package Arch Version Repository Size
============================================================================================================================================================================
Installing:
libobasis6.0-base x86_64 6.0.0.3-3 /libobasis6.0-base-6.0.0.3-3.x86_64 7.6 M
libobasis6.0-calc x86_64 6.0.0.3-3 /libobasis6.0-calc-6.0.0.3-3.x86_64 29 M
libobasis6.0-core x86_64 6.0.0.3-3 /libobasis6.0-core-6.0.0.3-3.x86_64 267 M
libobasis6.0-draw x86_64 6.0.0.3-3 /libobasis6.0-draw-6.0.0.3-3.x86_64 48 k
libobasis6.0-en-US x86_64 6.0.0.3-3 /libobasis6.0-en-US-6.0.0.3-3.x86_64 164 k
libobasis6.0-extension-beanshell-script-provider x86_64 6.0.0.3-3 /libobasis6.0-extension-beanshell-script-provider-6.0.0.3-3.x86_64 398 k
libobasis6.0-extension-javascript-script-provider x86_64 6.0.0.3-3 /libobasis6.0-extension-javascript-script-provider-6.0.0.3-3.x86_64 626 k
libobasis6.0-extension-mediawiki-publisher x86_64 6.0.0.3-3 /libobasis6.0-extension-mediawiki-publisher-6.0.0.3-3.x86_64 4.3 M
libobasis6.0-extension-nlpsolver x86_64 6.0.0.3-3 /libobasis6.0-extension-nlpsolver-6.0.0.3-3.x86_64 2.1 M
libobasis6.0-extension-pdf-import x86_64 6.0.0.3-3 /libobasis6.0-extension-pdf-import-6.0.0.3-3.x86_64 2.2 M
libobasis6.0-extension-report-builder x86_64 6.0.0.3-3 /libobasis6.0-extension-report-builder-6.0.0.3-3.x86_64 6.0 M
libobasis6.0-firebird x86_64 6.0.0.3-3 /libobasis6.0-firebird-6.0.0.3-3.x86_64 11 M
libobasis6.0-gnome-integration x86_64 6.0.0.3-3 /libobasis6.0-gnome-integration-6.0.0.3-3.x86_64 1.2 M
libobasis6.0-graphicfilter x86_64 6.0.0.3-3 /libobasis6.0-graphicfilter-6.0.0.3-3.x86_64 4.2 M
libobasis6.0-images x86_64 6.0.0.3-3 /libobasis6.0-images-6.0.0.3-3.x86_64 18 M
libobasis6.0-impress x86_64 6.0.0.3-3 /libobasis6.0-impress-6.0.0.3-3.x86_64 2.2 M
libobasis6.0-kde-integration x86_64 6.0.0.3-3 /libobasis6.0-kde-integration-6.0.0.3-3.x86_64 238 k
libobasis6.0-librelogo x86_64 6.0.0.3-3 /libobasis6.0-librelogo-6.0.0.3-3.x86_64 741 k
libobasis6.0-math x86_64 6.0.0.3-3 /libobasis6.0-math-6.0.0.3-3.x86_64 1.6 M
libobasis6.0-ogltrans x86_64 6.0.0.3-3 /libobasis6.0-ogltrans-6.0.0.3-3.x86_64 298 k
libobasis6.0-onlineupdate x86_64 6.0.0.3-3 /libobasis6.0-onlineupdate-6.0.0.3-3.x86_64 433 k
libobasis6.0-ooofonts x86_64 6.0.0.3-3 /libobasis6.0-ooofonts-6.0.0.3-3.x86_64 67 M
libobasis6.0-ooolinguistic x86_64 6.0.0.3-3 /libobasis6.0-ooolinguistic-6.0.0.3-3.x86_64 1.4 k
libobasis6.0-postgresql-sdbc x86_64 6.0.0.3-3 /libobasis6.0-postgresql-sdbc-6.0.0.3-3.x86_64 3.5 M
libobasis6.0-python-script-provider x86_64 6.0.0.3-3 /libobasis6.0-python-script-provider-6.0.0.3-3.x86_64 41 k
libobasis6.0-pyuno x86_64 6.0.0.3-3 /libobasis6.0-pyuno-6.0.0.3-3.x86_64 22 M
libobasis6.0-writer x86_64 6.0.0.3-3 /libobasis6.0-writer-6.0.0.3-3.x86_64 16 M
libobasis6.0-xsltfilter x86_64 6.0.0.3-3 /libobasis6.0-xsltfilter-6.0.0.3-3.x86_64 4.3 M
libreoffice6.0 x86_64 6.0.0.3-3 /libreoffice6.0-6.0.0.3-3.x86_64 4.5 M
libreoffice6.0-base x86_64 6.0.0.3-3 /libreoffice6.0-base-6.0.0.3-3.x86_64 63 libreoffice6.0-calc x86_64 6.0.0.3-3 /libreoffice6.0-calc-6.0.0.3-3.x86_64 63 libreoffice6.0-dict-en x86_64 6.0.0.3-3 /libreoffice6.0-dict-en-6.0.0.3-3.x86_64 24 M
libreoffice6.0-dict-es x86_64 6.0.0.3-3 /libreoffice6.0-dict-es-6.0.0.3-3.x86_64 4.1 M
libreoffice6.0-dict-fr x86_64 6.0.0.3-3 /libreoffice6.0-dict-fr-6.0.0.3-3.x86_64 6.4 M
libreoffice6.0-draw x86_64 6.0.0.3-3 /libreoffice6.0-draw-6.0.0.3-3.x86_64 63 libreoffice6.0-en-US x86_64 6.0.0.3-3 /libreoffice6.0-en-US-6.0.0.3-3.x86_64 16 k
libreoffice6.0-freedesktop-menus noarch 6.0.0-3 /libreoffice6.0-freedesktop-menus-6.0.0-3.noarch 30 M
libreoffice6.0-impress x86_64 6.0.0.3-3 /libreoffice6.0-impress-6.0.0.3-3.x86_64 66 libreoffice6.0-math x86_64 6.0.0.3-3 /libreoffice6.0-math-6.0.0.3-3.x86_64 63 libreoffice6.0-ure x86_64 6.0.0.3-3 /libreoffice6.0-ure-6.0.0.3-3.x86_64 38 M
libreoffice6.0-writer x86_64 6.0.0.3-3 /libreoffice6.0-writer-6.0.0.3-3.x86_64 65 Transaction Summary
============================================================================================================================================================================
Install 41 Packages
Total size: 579 M
Installed size: 579 M
Is this ok [y/d/N]: y
On Debian/Ubuntu/Linux Mint
## For 32 Bit OS ##
$ cd /tmp/LibreOffice_6.0.0.3_Linux_x86_deb/DEBS/
$ sudo dpkg -i *.deb
## For 64 Bit OS ##
$ cd /tmp/LibreOffice_6.0.0.3_Linux_x86-64_deb/DEBS/
$ sudo dpkg -i *.deb

Installing LibreOffice 6.0 on Ubuntu

[email protected] /tmp/LibreOffice_6.0.0.3_Linux_x86-64_deb/DEBS $ sudo dpkg -i *.deb
Selecting previously unselected package libobasis6.0-base.
(Reading database ... 263169 files and directories currently installed.)
Preparing to unpack libobasis6.0-base_6.0.0.3-3_amd64.deb ...
Unpacking libobasis6.0-base (6.0.0.3-3) ...
Selecting previously unselected package libobasis6.0-calc.
Preparing to unpack libobasis6.0-calc_6.0.0.3-3_amd64.deb ...
Unpacking libobasis6.0-calc (6.0.0.3-3) ...
Selecting previously unselected package libobasis6.0-core.
Preparing to unpack libobasis6.0-core_6.0.0.3-3_amd64.deb ...
Unpacking libobasis6.0-core (6.0.0.3-3) ...
...

Step 5: Starting LibreOffice 6.0

Once the installation process completes you will have LibreOffice icons in your desktop under Applications –> Office menu or start the application by executing the following command on the terminal.

# libreoffice6.0

Step 6: Screenshot of LibreOffice 6.0

Please see the attached screenshot of LibreOffice 6.0 application under my CentOS 7.0.

LibreOffice 6.0 Running on CentOS 7

LibreOffice 6.0 Running on CentOS 7

Step 7: Installing a Language Pack

If you would like to install LibreOffice in your preferred language, you should select your language pack for installation. The installation instructions can be fount at Language Pack section.

Enable Debugging Mode in SSH to Troubleshoot Connectivity Issues

In this article, we will show you how to turn on debugging mode while running SSH in Linux. This will enable you to see what actually unfolds when you execute an ssh command to connect to a remote Linux server using the verbose mode or debugging mode.

Read Also: 4 Ways to Speed Up SSH Connections in Linux

The ssh client’s -v switch allows you to run ssh in verbose mode, that prints debugging information about SSH connection progress, which is really useful for debugging connections, authentication, and any configuration problems. There are different levels of verbosity; using multiple -v flags increases the verbosity (maximum verbosity level is 3).

The following command will run SSH in first level of verbosity, which gives us lots of debugging information as shown.

[email protected] ~ $ ssh -v [email protected]
Sample Output
OpenSSH_7.2p2 Ubuntu-4ubuntu2.2, OpenSSL 1.0.2g-fips 1 Mar 2016
debug1: Reading configuration data /home/aaronkilik/.ssh/config
debug1: /home/aaronkilik/.ssh/config line 18: Applying options for *
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 192.168.56.10 [192.168.56.10] port 22.
debug1: Connection established.
debug1: identity file /home/aaronkilik/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /home/aaronkilik/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/aaronkilik/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/aaronkilik/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/aaronkilik/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/aaronkilik/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/aaronkilik/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/aaronkilik/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.2
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.4
debug1: match: OpenSSH_7.4 pat OpenSSH* compat 0x04000000
debug1: Authenticating to 192.168.56.10:22 as 'tecmint'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: [email protected]
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: [email protected] MAC: compression: [email protected]
debug1: kex: client->server cipher: [email protected] MAC: compression: [email protected]
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:1778erqyug4tHJa7D6y/Ep4UWsUtNEOBSMaj32k9oO8
debug1: Host '192.168.56.10' is known and matches the ECDSA host key.
debug1: Found key in /home/aaronkilik/.ssh/known_hosts:8
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<rsa-sha2-256,rsa-sha2-512>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/aaronkilik/.ssh/id_rsa
debug1: Server accepts key: pkalg rsa-sha2-512 blen 279
debug1: Enabling compression at level 6.
debug1: Authentication succeeded (publickey).
Authenticated to 192.168.56.10 ([192.168.56.10]:22).
debug1: channel 0: new [client-session]
debug1: Requesting [email protected]
debug1: Entering interactive session.
debug1: pledge: network
debug1: client_input_global_request: rtype [email protected] want_reply 0
debug1: Sending environment.
debug1: Sending env LC_PAPER = lg_UG.UTF-8
debug1: Sending env LC_ADDRESS = lg_UG.UTF-8
debug1: Sending env LC_MONETARY = lg_UG.UTF-8
debug1: Sending env LC_NUMERIC = lg_UG.UTF-8
debug1: Sending env LC_TELEPHONE = lg_UG.UTF-8
debug1: Sending env LC_IDENTIFICATION = lg_UG.UTF-8
debug1: Sending env LANG = en_US.UTF-8
debug1: Sending env LC_MEASUREMENT = lg_UG.UTF-8
debug1: Sending env LC_NAME = lg_UG.UTF-8
Last login: Sat Jan 6 16:20:11 2018 from 192.168.56.1

When try to logout or exit the session, you will also see debugging messages as shown.

[[email protected] ~]$ exit
logout
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: client_input_channel_req: channel 0 rtype [email protected] reply 0
debug1: channel 0: free: client-session, nchannels 1
Connection to 192.168.56.10 closed.
Transferred: sent 3392, received 3120 bytes, in 118.1 seconds
Bytes per second: sent 28.7, received 26.4
debug1: Exit status 0
debug1: compress outgoing: raw data 1159, compressed 573, factor 0.49
debug1: compress incoming: raw data 573, compressed 1159, factor 2.02

Next, you can enable additional (level 2 and 3) verbosity for even more debugging messages as shown.

$ ssh -vv [email protected]
$ ssh -vvv [email protected]

That’s It! For more usage of SSH, read these following related articles.

  1. How to Find All Failed SSH login Attempts in Linux
  2. How to Disable SSH Root Login in Linux
  3. SSH Passwordless Login Using SSH Keygen in 5 Easy Steps
  4. How to Disconnect Inactive or Idle SSH Connections in Linux

We hope you find this article helpful. You can ask any questions or share thoughts via the comment form below.

Become a Professional Python Programmer

‘,
enableHover: false,
enableTracking: true,
buttons: { twitter: {via: ‘tecmint’}},
click: function(api, options){
api.simulateClick();
api.openPopup(‘twitter’);
}
});
jQuery(‘#facebook’).sharrre({
share: {
facebook: true
},
template: ‘{total}’,
enableHover: false,
enableTracking: true,
click: function(api, options){
api.simulateClick();
api.openPopup(‘facebook’);
}
});
jQuery(‘#googleplus’).sharrre({
share: {
googlePlus: true
},
template: ‘{total}’,
enableHover: false,
enableTracking: true,
urlCurl: ‘https://www.tecmint.com/wp-content/themes/tecmint/js/sharrre.php’,
click: function(api, options){
api.simulateClick();
api.openPopup(‘googlePlus’);
}
});
jQuery(‘#linkedin’).sharrre({
share: {
linkedin: true
},
template: ‘{total}’,
enableHover: false,
enableTracking: true,
buttons: {
linkedin: {
description: ‘Become a Professional Python Programmer’,media: ‘https://www.tecmint.com/wp-content/uploads/2018/01/Professional-Python-Programming.jpg’ }
},
click: function(api, options){
api.simulateClick();
api.openPopup(‘linkedin’);
}
});
// Scrollable sharrre bar, contributed by Erik Frye. Awesome!
var shareContainer = jQuery(“.sharrre-container”),
header = jQuery(‘#header’),
postEntry = jQuery(‘.entry’),
$window = jQuery(window),
distanceFromTop = 20,
startSharePosition = shareContainer.offset(),
contentBottom = postEntry.offset().top + postEntry.outerHeight(),
topOfTemplate = header.offset().top;
getTopSpacing();
shareScroll = function(){
if($window.width() > 719){ var scrollTop = $window.scrollTop() + topOfTemplate,
stopLocation = contentBottom – (shareContainer.outerHeight() + topSpacing);
if(scrollTop > stopLocation){
shareContainer.offset({top: contentBottom – shareContainer.outerHeight(),left: startSharePosition.left});
}
else if(scrollTop >= postEntry.offset().top-topSpacing){
shareContainer.offset({top: scrollTop + topSpacing, left: startSharePosition.left});
}else if(scrollTop 1024)
topSpacing = distanceFromTop + jQuery(‘.nav-wrap’).outerHeight();
else
topSpacing = distanceFromTop;
}
});
]]>

6 Online Tools for Generating and Testing Cron Jobs for Linux

As a Linux system administrator, you can perform time-based scheduling of jobs/tasks using online cron job services or Cron, a powerful utility available in Unix/Linux systems.

In Linux, cron runs as a daemon and can be used to schedule tasks such as commands or shell scripts to perform various kinds of backups, system updates and much more, that run periodically and automatically in the background at specific times, dates, or intervals.

Scheduling a cronjob with the correct syntax can be confusing sometimes, wrong expressions can cause cronjobs to fail or not even run at all. In this article, we will list 6 useful online (web based) utilities for creating and testing cronjob scheduling syntax in Linux.

1. Crontab Generator

Crontab Generator is a useful online utility for generating a crontab entry to help schedule a job. It offers a simple, descriptive generator that can help you to produce a crontab syntax that you can copy and paste to your crontab file.

Crontab Generator

Crontab Generator

2. Cron Maker


Cron Maker is a web based utility which helps you to build cron expressions; it employs the Quartz open source library and all expressions are based on Quartz cron format. It also enables you to view next scheduled dates (simply enter a cronjob expression and calculate the next dates).

Cron Maker

Cron Maker

3. Crontab GUI

Crontab GUI is a great and the original online crontab editor. It works well (fully optimized) on mobile devices (you can generate cron syntax on your smart phone or tablet PC’s web browser).

Crontab GUI Tool

Crontab GUI Tool

4. CRON Tester

CRON Tester is a useful cron tester that allows you to test your cron time definitions. All you need to do is copy and paste your cron syntax in the cron definition field, then choose the number of iterations and click on “Test” to see the various dates on which it will run.

Cron Tester

Cron Tester

5. Crontab Guru

Crontab Guru is a simple online cron schedule expression editor. In addition, it provides a useful means of monitoring your cronjob. All you need to do is copy a command snippet provided and append at the end of the crontab definition. In case your cron job fails or doesn’t even start, you will receive an alert email.

Crontab Guru

Crontab Guru

6. Easycron

Easycron is a great web based cron scheduler for corntab.com cron editor. You can create a cron job by specifying a “URL to call”, set when it should be executed, specify a cron expression or add it manually from a descriptive form. Importantly, you can optionally use basic HTTP authentication for a small layer of security.

EasyCron

EasyCron

You might also like to read these following related articles on Cron scheduler utility.

  1. 11 Cron Job Scheduling Examples in Linux
  2. Cron Vs Anacron: How to Schedule Jobs Using Anacron on Linux
  3. How to Run PHP Script as Normal User with Cron

That’s all! If you know of any other useful web based cronjob expression generator or testers missing in the list above, let us know via the comment section below.

How to Use Continuous Release (CR) Repository in CentOS

‘,
enableHover: false,
enableTracking: true,
buttons: { twitter: {via: ‘tecmint’}},
click: function(api, options){
api.simulateClick();
api.openPopup(‘twitter’);
}
});
jQuery(‘#facebook’).sharrre({
share: {
facebook: true
},
template: ‘{total}’,
enableHover: false,
enableTracking: true,
click: function(api, options){
api.simulateClick();
api.openPopup(‘facebook’);
}
});
jQuery(‘#googleplus’).sharrre({
share: {
googlePlus: true
},
template: ‘{total}’,
enableHover: false,
enableTracking: true,
urlCurl: ‘https://www.tecmint.com/wp-content/themes/tecmint/js/sharrre.php’,
click: function(api, options){
api.simulateClick();
api.openPopup(‘googlePlus’);
}
});
jQuery(‘#linkedin’).sharrre({
share: {
linkedin: true
},
template: ‘{total}’,
enableHover: false,
enableTracking: true,
buttons: {
linkedin: {
description: ‘How to Use Continuous Release (CR) Repository in CentOS’,media: ‘https://www.tecmint.com/wp-content/uploads/2018/01/Enable-CentOS-CR-Repository.png’ }
},
click: function(api, options){
api.simulateClick();
api.openPopup(‘linkedin’);
}
});
// Scrollable sharrre bar, contributed by Erik Frye. Awesome!
var shareContainer = jQuery(“.sharrre-container”),
header = jQuery(‘#header’),
postEntry = jQuery(‘.entry’),
$window = jQuery(window),
distanceFromTop = 20,
startSharePosition = shareContainer.offset(),
contentBottom = postEntry.offset().top + postEntry.outerHeight(),
topOfTemplate = header.offset().top;
getTopSpacing();
shareScroll = function(){
if($window.width() > 719){ var scrollTop = $window.scrollTop() + topOfTemplate,
stopLocation = contentBottom – (shareContainer.outerHeight() + topSpacing);
if(scrollTop > stopLocation){
shareContainer.offset({top: contentBottom – shareContainer.outerHeight(),left: startSharePosition.left});
}
else if(scrollTop >= postEntry.offset().top-topSpacing){
shareContainer.offset({top: scrollTop + topSpacing, left: startSharePosition.left});
}else if(scrollTop 1024)
topSpacing = distanceFromTop + jQuery(‘.nav-wrap’).outerHeight();
else
topSpacing = distanceFromTop;
}
});
]]>

The Complete 2018 CompTIA Certification Training Bundle (14 Courses)

Today, IT success stories start with the CompTIA certifications and here is The Complete 2018 CompTIA Certification Training Bundle, the ultimate (14 Courses, 140+ Hours!) IT certification training guide to prepare you to excel in various CompTIA certification exams.

The training in this bundle starts with covering the fundamentals of computer technology, installation, and configuration of PCs, laptops as well as related hardware. Then you will learn the necessary skills for installing and configuring PC operating systems.

In the third course, you will dive into the fundamentals of clouding computing. Thereafter, you will move into security, where you will learn communication security, infrastructure security, cryptography, operational security, and general security concepts.

Further more, you will also study software operating systems, common file types, software management best practices, plus lots more. You will also learn how to secure mobile devices.


Importantly, you will master project management, where you will understand the entire project life cycle, from initiation and planning through execution. You will also master Linux system administration, under which you will study user administration, group and profile management, shell scripting and I/O control statements, networking and much more in Linux.

The final course in this bundle will take you through networking, under which you will learn the knowledge and skills needed to install, manage, and troubleshoot a variety of networks on any platform.

What’s included in This Bundle:

  • CompTIA A+ 220-901
  • CompTIA A+ 220-902
  • CompTIA Cloud Essentials CLO-001
  • CompTIA Security+ SY0-401
  • CompTIA Security+ SY0-501
  • CompTIA IT Fundamentals FC0-U51
  • CompTIA Mobility+ MB0-001
  • CompTIA Cloud+
  • CompTIA Project+ PK0-003
  • CompTIA Linux+ XKO-002
  • CompTIA CSA+
  • CompTIA Advanced Security Practitioner
  • CompTIA Certified Healthcare IT Technician Exam Study Guide
  • CompTIA Network+ N10-006

Start a path to a lucrative IT career by subscribing to this remarkable bundle now, at 98% off or for as low as $59 on Tecmint Deals.

How to Save Top Command Output to a File

Linux top command is highly used by system administrators to display system statistics in real time regarding system uptime and load average, used memory, running tasks, a summary of processes or threads and detailed information about each running process.

However, besides real time viewing of the running system, top command output can be saved to a file, by using the -b flag, which instructs top to operate in batch mode and -n flag to specify the amount of iteration the command should output.

In the below example, we’ll redirect the output of top command to top.txt file in the current working directory. The -n argument will be used to send only one snapshot of the command to the mentioned file.

$ top -b -n 1 > top.txt

To read the resulted file, use a command line file reader utility, such as cat command, less or more.

$ less top.txt
View Output of Top Command

View Output of Top Command


To grab five iteration of top command, execute the command as shown in the below excerpt.

$ top -b -n 5 > top-5iterations.txt

In order to display only the number of running tasks from the resulted file, use the grep filter, as shown in the below command example.

$ cat top-5iterations.txt | grep Tasks
Show Top 5 Running Tasks

Show Top 5 Running Tasks

To take a snapshot of a specific process in top utility, execute command with the PID (-p) flag. To get the PID of a running process, issue pidof command against the name of the running process.

In this example we’ll monitor the cron process via top command by taking three snapshots of the PID.

$ pidof crond
$ top -p 678 -b -n3 > cron.txt
$ cat cron.txt
Watch Process Usage in Top Command

Watch Process Usage in Top Command

Using a for iteration loop, we can display a process statistics via its PID, each two seconds, as shown in the below example. The output of the loop can also be redirected to a file. We’ll use the same cron PID as shown in the above example.

$ for i in {1..4}; do sleep 2 && top -b -p 678 -n1 | tail -1 ; done 

Redirect loop output to file.

$ for i in {1..4}; do sleep 2 && top -b -p 678 -n1 | tail -1 ; done >> cron.txt
$ cat cron.txt
Find Linux Process Statistics

Find Linux Process Statistics

These are just a few examples on how you can monitor and gather system and process statistics via top command.

How to Change FTP Port in Linux

FTP or File Transfer Protocol is one of the oldest network protocol used today as standard file transfers over computer networks. FTP protocol uses the standard port 21/TCP as command port. Although, there are a lot of implementations of FTP protocol in server-side in Linux, in this guide we’ll cover how to change the port number in the Proftpd service implementation.

In order to change Proftpd service default port in Linux, first open Proftpd main configuration file for editing with your favorite text editor by issuing the below command. The opened file has different paths, specific to your own installed Linux distribution, as follows.

# nano /etc/proftpd.conf [On CentOS/RHEL]
# nano /etc/proftpd/proftpd.conf [On Debian/Ubuntu]

In proftpd.conf file, search and comment the line that begins with Port 21. You need to add a hashtag (#) in front of the line in order to comment the line.

Then, under this line, add a new port line with the new port number. You can add any TCP non-standard port between 1024 to 65535, with the condition that the new port is not already taken in your system by other application which binds on it.


In this example we’ll bind FTP service on port 2121/TCP.

#Port 21
Port 2121
Change FTP Port in Debian & Ubuntu

Change FTP Port in Debian & Ubuntu

In RHEL based distributions, the Port line is not present in Proftpd configuration file. To change the port, just add a new port line at the top of the configuration file, as illustrated in the below excerpt.

Port 2121
Change FTP Port in CentOS & RHEL

Change FTP Port in CentOS & RHEL

After you’ve changed the port number, restart the Proftpd daemon to apply changes and issue netstat command to confirm that FTP service listens on the new 2121/TCP port.

# systemctl restart proftpd
# netstat -tlpn| grep ftp
OR
# ss -tlpn| grep ftp
Confirm FTP Port

Confirm FTP Port

Under CentOS or RHEL Linux based distributions, install policycoreutils package and add the below SELinux rules in order for the FTP daemon to bind on the 2121 port.

# yum install policycoreutils
# semanage port -a -t http_port_t -p tcp 2121
# semanage port -m -t http_port_t -p tcp 2121
# systemctl restart proftpd

Finally, update your Linux distribution firewall rules in order to allow inbound traffic on the new FTP port. Also, check FTP server passive port range and make sure you also update the firewall rules to reflect passive port range.

Use Glances to Monitor Remote Linux in Web Server Mode

Glances is a free open source, modern, cross-platform, real-time top and htop like system monitoring tool. It offers advanced features compared to its counterparts, and can run in different modes: as a standalone, in client/server mode and in web server mode.

Considering the web server mode, you do not necessarily need to log into your remote server via SSH to run glances, you can run it in web server mode and access it via a web browser to remotely monitor your Linux server, as explained below.

To run glances in web server mode, you need to install it together with the Python bottle module, a fast, simple and lightweight WSGI micro web-framework, using the appropriate command for your Linux distribution.

$ sudo apt install glances python-bottle #Debian/Ubuntu
$ sudo yum install glances python-bottle #RHEL/CentOS
$ sudo dnf install glancespython-bottle #Fedora 22+

Alternatively, install it using PIP command like shown.

$ sudo pip install bottle


Once you have installed the above packages, launch glances with the -w flag to run it in web server mode. By default, it will listen on port 61208.

$ glances -w OR
$ glances -w &

If you are running firewalld services, then you should open port 61208 to allow inbound traffic to that port.

$ sudo firewall-cmd --permanent --add-port=61208/tcp
$ sudo firewall-cmd --reload

For UFW firewall, run these commands.

$ sudo ufw allow 61208/tcp
$ sudo ufw allow reload

After that, from a web browser, use the URL http://SERVER_IP:61208/ to access the glances UI.

If you are using systemd system and services manager, you can run glances in web server mode as a service for efficient management, as explained in the next section. I actually prefer this method to running it as a background process.

Run Glances in Web Server Mode as a Service

Start by creating your service unit file (which I have preferred to name as glancesweb.service) under /usr/lib/systemd/system/glancesweb.service.

$ sudo vim /usr/lib/systemd/system/glancesweb.service

Then copy and paste the unit file configuration below in it.

[Unit]
Description = Glances in Web Server Mode
After = network.target
[Service]
ExecStart = /usr/bin/glances -w -t 5
[Install]
WantedBy = multi-user.target

The above configuration tells systemd that this is a unit of type service, it should be loaded after the network.target.

And once the system is in the network target, systemd will invoke the command “/usr/bin/glances -w -t 5” as a service. The -t specifies an interval for live updates in seconds.

The [install] section informs systemd that this service is wanted by “multi-user.target”. Therefore, when you enable it, a symbolic link is created from the /etc/systemd/system/multi-user.target.wants/glancesweb.service to /usr/lib/systemd/system/glancesweb.service. Disabling it will delete this symbolic link.

Next, enable your new systemd service, start and view its status as follows.

$ sudo systemctl enable connection.service
$ sudo systemctl start connection.service
$ sudo systemctl status connection.service

Finally, from your web browser, use the URL http://SERVER_IP:61208/ to remotely monitor your Linux servers via the glances UI, on any device (smart phone, tablet or computer).

Monitor Remote Linux Server Under Glances

Monitor Remote Linux Server Under Glances

Monitor Remote Linux Processes Under Glances

Monitor Remote Linux Processes Under Glances

You can change the refresh rate of the page, simply add the period in seconds at the end of the URL, this sets the refresh rate to 8 seconds.

http://SERVERI_P:61208/8 

One downside of running glances in web server mode is that, if the Internet connection is poor the client tends to easily disconnect from the server.

You can learn how to create new systemd services from this guide:

  1. How to Create and Run New Service Units in Systemd Using Shell Script

That’s all! If you have any questions or additional information to add, use the comment from below.