# data[].attributes.attachment_link.readable_text
Selecting the best web browsers for Ubuntu largely depends on your personal needs, but usually, browsers are used for accessing/browsing websites.

In this article, we will look under the hood and highlight some of the best web browsers for Ubuntu.

1) Google Chrome

Google Chrome is arguably one of the best and most widely used web browsers owing to its fantastic features including the tabbed window interface. There are three different WebM codes for the best audio and HTML5 videos including your bookmarks.

Google chrome works well in Ubuntu both in PC and in smartphones. It has wonderful features such as bookmarking and synchronization. Google Chrome is based on open source Chromium that is supported by Google Inc.

Google Chrome and Chromium have a malware-blocking program that secures personal data. There are additional plugins in chromium store that increases its functionality in Linux system. Most users believe that Chrome is one of the best web browsers available in the Linux world.

2) Firefox

Firefox is another browser you can comfortably use on Ubuntu Linux. Also available in other platforms such as Linux, Androids, OS X, and Windows. Tabbed browsing, private surfing, and spell checks are some of the features present in the Ubuntu version.

The browser widely supports XML, HTML4, and XHTML etc.

3) Vivaldi

The developers of Vivaldi browser had an ultimate goal of providing the fastest browsing experience with features such as quick access commands, accessible tab management, etc.

Its developers enabled the use of HTML5 and node.js. The layout search engine borrows from Blink. You also have an opportunity to choose a theme and use thumbnails for every site you visit.

4) Opera

Opera is a widely established browser coded in C++, and it supports Windows, MacOS, Android phones, and Linux. It is widely known for its high speed tabbed cycling, the best VPN service, and Adblocker.

The browser supports Opera turbo to facilitate fatter surfing.

5) Yandex Browser

Yandex browser has its origin in Russia and offers a modern user interface accompanied by faster browsing. The search engine of choice is, of course, the Blink engine.

The browser is chromium-based with quick page loading in poor internet connection. You can also use this browser on Windows, Linux, and iOS.

6) Waterfox

Waterfox is a browser based on Firefox and works well on Linux, Windows, MacOS, and Android. The browser was introduced in 2011 after the Mozilla Firefox Code. Waterfox is available in Cross Platform Component Object Model (XPCOM) and XML User Interface Language (XUL).
Waterfox download page
7) SeaMonkey

Seamonkey is based on the Mozilla codebase and it works well in industrial growth and performance. The browser is compatible with high-speed browsing, and its latest update uses the latest Mozilla code.

Has a neat and clean user interface with manageable features. New users will find the tabs and email components easy to handle and use.
Seamonkey download page
8) Pale Moon Browser

For anyone who enjoys trying out new things, Pale moon should be something worth trying out. It is an open source browser with a focus on efficiency and compatibility with different Firefox extensions as well.

Pale Moon has excellent visual feedback that guarantees flexible configuration.
Pale Moon download page
9) Epiphany

The GNOME community came up with a simple yet powerful browser for Ubuntu while maintaining the standard format. The lightweight browser is extremely simple to use if you look at the excellent design and the user interface that any new user can adapt to.

Epiphany is based Webkit browser engine and can be used on a large scale owing to its compelling features.
Epiphany download page
10) Iridium

Iridium is known for its privacy when used in Ubuntu. It is also user-friendly and easy to operate. Iridium is Chromium based and can handle a wide range of complicated sites at high speed.

11) Qupzilla

For a browser that works well with KDE desktop application, the choice of Qupzilla should be your best choice. The Qupzilla project started in 2010 and most of its functions have been used in modern day web browsers.

The browser has a simple user interface to the users with the most interactive feature found on its user-friendly interface. You can create bookmarks, ad blocks, speed dial, etc.

12) Brave

This browser was made by a Mozilla co-founder using JavaScript and C++ codes. The main goal of the browser was to block people who track browsing activity. Users can operate Linux, Windows, Android, and MacOS.

It offers faster page loading and does not have any pop-ups showing up when in use.
Brave download page
Conclusion

In this tutorial, we gave an insight into some of the best web browsers for Ubuntu systems. Perhaps you have used one that is not mentioned, feel free to give us an update in the comment section.

# data[].attributes.attachment_link.description
Selecting the best web browsers for Ubuntu largely depends on your personal needs, but usually, browsers are used for accessing/browsing websites. In this article, we will look under the hood and highlight some of the best web browsers for Ubuntu. 1) [...]

# data[].attributes.attachment_link.readable_text
This guide is intended to help you get a list of owners of all files in a directory on Linux. The commands shown here are universal and are expected to work on any Linux Distribution. My Lab though is based on Ubuntu 18.04,16.04 and CentOS 7.

Working with files, directories, and user permissions is a daily basis task when administering Linux systems. Almost everything on Linux is a file, and knowing how to check and change the ownership of a file/directory comes in handy.

List owners of files in a directory using stat command

stat is a command line tool used to display file or file system status on Linux/Unix systems. On Ubuntu and all Debian based systems, stat command is provided by the coreutils package. If for any reason this package is not installed, you can install it using the command:

$ sudo apt-get -y install coreutils

On CentOS, the command is also provided by the coreutils package which can be installed using yum if missing:

$ sudo yum -y install coreutils

Once confirmed that the command exists, we'll use below options to get owners of files on a directory:

-c : To specify the format
%U : Format for printing username of the file owner

So command syntax is:

 stat -c %U  <file>

For all files use wildcard * mark. See examples below:

$ cd ~
$ stat -c %U *
jmutai
jmutai
jmutai

The problem with this output is that there is no mapping between the file and owner. We'll need to use bash concepts to map file and owner. So we'll run a command like below:

$ cd /dir
$ files=`ls`
$ for file in $files; do owner=`stat -c %C $file`; echo $file $owner; done

The output for above will be in the format <file> <owner> which should be easy to interpret.

Development jmutai
Documents root
ping_all.sh dan
examples.desktop benard

For other stat valid format sequences for files, check its man page:

$ man stat

List owners of files in a directory using find command

A find is a Linux command line tool often used to search for files in a directory. With some regex and print command, you can list the owners of files in a directory

The exact command syntax to use is:

# find /dir -printf '%u\n'

This will do a recursive search and listing by default. You can do further filtering like print unique usernames to avoid duplicates. For this, pipe the output to sort command, with option -u

# find /dir -printf '%u\n' | sort -t: -u

To include file group ownership, add a %g option in the print function.

# find /dir -printf '%u:%g\n' | sort -t: -u

The example below will print all unique usernames owning files in the /var/ directory

See next example for usernames and groups:

,

Using ls command

You can also use ls command to check the owner of files and directories in Linux. The only problem is how to handle recursive ownership.

# ls -lh /dir
# ls -lhR /dir

The ab0ve three commands should help you identify owners of files and directories in your Linux machines. If you have any other commands/script you feel we can update in this list, please don't hesitate to share.

# data[].attributes.attachment_link.title
How to Get List of all Owners of Files in a Linux Directory

# data[].attributes.attachment_link.description
This guide is intended to help you get a list of owners of all files in a directory on Linux. The commands shown here are universal and are expected to work on any Linux Distribution. My Lab though is based [...]

# data[].attributes.headline
Learn How to Install GUI on Ubuntu Server - An Easy Guide

# data[].attributes.subject
Learn How to Install GUI on Ubuntu Server - An Easy Guide

# data[].attributes.attachment_link.readable_text
Usually, it's not advised to run a GUI (Graphical User Interface) on a server system. Operation on any server should be done on the CLI (Command Line Interface). The primary reason for this is that GUI exerts a lot of demand on hardware resources such as RAM and CPU. However, if you are a little curious and want to try out different light-weight Desktop managers on one of your servers, follow this guide.

In this tutorial, I am going to cover the installation of 7 desktop environments on Ubuntu.

Prerequisites

Before getting started, ensure that you update & upgrade your system

$ sudo apt update && sudo apt upgrade

Next, install tasksel manager.

$sudo apt install tasksel

Now we can begin installing the various Desktop environments.

1) Mate Core Server Desktop

Installing the MATE desktop use the following command

$ sudo tasksel install ubuntu-mate-core

Once the GUI is up and running launch it using the following option

$ sudo service lightdm start

2) Lubuntu Core Server Desktop

This is considered to be the most lightweight and resource friendly GUI for Ubuntu 18.04 server
It is based on the LXDE desktop environment. To install Lubuntu execute

$ sudo tasksel install lubuntu-core

Once the Lubuntu-core GUI is successfully installed, launch the display manager by running the command below or simply by rebooting your system

$ sudo service lightdm start

Thereafter, Log out and click on the button as shown to select the GUI manager of your choice

In the drop-down list, click on Lubuntu

Log in and Lubuntu will be launched as shown

3) Kubuntu Core Server Desktop

Xubuntu is yet another light-weight desktop environment that borrows a lot from Xfce desktop environment.

To get started with the installation of Xubuntu run the command below

$ sudo tasksel install kubuntu-desktop

Once it is successfully installed, start the display manager by running the command below or simply restart your server

$ sudo service lightdm start

Once again, log out or restart your machine and from drop the drop-down list, select Kubuntu

4) XFCE

Xubuntu borrows a leaf from the Xfce4 environment. To install it use the following command

# sudo tasksel install xfce4-slim

After the GUI installation, use the command to activate it

# sudo service slim start

This will prompt you to select the default manager. Select slim and hit ENTER.

Log out or reboot and select 'Xfce' option from the drop-down list and login using your credentials.

Shortly, the Xfce display manager will come to life.

5) LXDE

This desktop is considered the most economical to system resources. Lubuntu is based on LXDE desktop environment. Use the following command

$ sudo apt-get install lxde

To start LXDE, log out or reboot and select 'LXDE' from the drop-down list of display managers on log on.

6) GNOME

Gnome will take typically 5 to 10 minutes to install depending on the hardware and software requirements your server has. Run the following command to install Gnome

$ sudo apt-get install ubuntu-gnome-desktop

or

$sudo tasksel ubuntu-desktop

To activate Gnome, restart the server or use the following command

$ sudo service lightdm start

7) Budgie Desktop

Finally, let us install Budgie Desktop environment. To accomplish this, execute the following command

$ sudo apt install ubuntu-budgie-desktop

After successful installation, log out and select the Budgie desktop option. Log in with your username and password and enjoy the beauty of budgie!

Sometimes you need the GUI on your Ubuntu server to handle simple day-to-day tasks that need quick interaction without going deep into the server settings. Feel free to try out the various display managers and let us know your thoughts.

# data[].attributes.attachment_link.title
How to Install the GUI/Desktop on Ubuntu Server

# data[].attributes.attachment_link.description
Usually, it's not advised to run a GUI (Graphical User Interface) on a server system. Operation on any server should be done on the CLI (Command Line Interface). The primary reason for this is that GUI exerts a lot of [...]

# data[].attributes.attachment_link.readable_text
In this brief guide, we will look at how you can compress and extract tar xz tarball files/directories with a .tar.xz file extension in Linux.

The xz format is a single-file compression format that is based on the LZMA2 algorithm. It offers lossless compression, implying that it keeps the original data without compromising on its quality. This makes it ideal for shipping software application and image files. The xz compression is much slower but its decompression is quite fast.

Before we begin compressing or uncompressing files, first ensure that xz tools are installed. Newer Linux distributions come with xz tools already installed. However, if xz tools are missing, install using the following commands.
Install xz-utils on Debian/Ubuntu
To install xz tools in Ubuntu and Debian distros, run the command below

sudo apt install xz-utils
Output Install xz tool on CentOS/RHEL
For CentOS and RedHat distributions run

yum install xz
Output Install xz tool on Fedora
For Fedora systems run

dnf install xz
Output
How to Create xz compressed file

In this example, we are going to compress a directory data containing a few files

To compress the directory, execute the command below

tar -cjcf data.tar.xz data/

You can confirm the creation of a .tar.xz file using the ls command as shown
Output
How to extract/unzip xz tar file

To uncompress the xz tarball we just created, execute the command below

tar -xvf data.tar.xz
Output
As seen above, the command is the same as extracting a .tar.gz file

This short article illustrates how you can proceed to compress and unzip xz tarball files in Linux on the command line. Feel free to try out the commands and let us know how it went. Thanks!

Read Also:

# data[].attributes.attachment_link.description
In this brief guide, we will look at how you can compress and extract tar xz tarball files/directories with a .tar.xz file extension in Linux. The xz format is a single-file compression format that is based on the LZMA2 algorithm. It [...]

# data[].attributes.attachment_link.readable_text
In this article, I will show you how to list all running services on Linux. We will also check how to check the status of a service on a systemd system.

Let's learn different commands used to list services on Centos/RHEL 7.x.

Check and Listing linux services (systemd on Centos/RHEL 7.x)

To list systemd services we will use systemctl command as below

# systemctl list-unit-files
Sample Output
To list active systemd services run

# systemctl | more
Sample Output
Another command you can use is

# systemctl list-units --type service
Sample Output
You can pipe the output to grep to search a more specific service as shown below

# systemctl | grep "apache2"
Output
Listing services using Netstat Command

Nestat command is a tool used for examining active network connections, interface statistics as well as the routing table. It's available in all Linux distributions and here we will check how to list services using netstat command.

To check the services alongside the ports they are listening.

# netstat -pnltu
Output
Viewing /etc/services file

The /etc/services is an ASCII file that contains information about numerous services that client applications might use on the computer. Within the file is the service name, port number and protocol it uses, and any applicable aliases. ITO put t indicates whether a service is TCP or UDP and the name it goes by according to IANA. This information is helpful especially if you are unsure which service is running on which port by default.

To get a clearer picture, view the /etc/services file using a text editor of your choice.

vim /etc/services
Output
Systemd services status check

In newer versions of Linux, Systemd init is present. To check if a service is running, use the syntax below
Syntax
# systemctl status service_name

For example, to check if OpenSSH is running on your system, run

# systemctl status sshd
Output
Alternatively, you can use the syntax below to check if the service is active

# systemctl is-active service_name

In this case, to check if OpenSSH is active, execute

# systemctl is-active sshd
Output
Also, you can use the command below to check if a service is enabled

# systemctl is-enabled service_name

To check if OpenSSH is enabled, run

# systemctl is-enabled sshd
Output
Checking the status of services in older systems (Centos/Rhel 6.x)

For systems running SysV Init, you can check the status of services by running

# service service_name status

For example, to check the status of OpenSSH, run

# service sshd status
Output
You can also check all services by running

# chkconfig --list
Output
We hope you found this article useful. Feel free to try out some of the systemd commands listed here.

# data[].attributes.attachment_link.description
In this article, I will show you how to list all running services on Linux. We will also check how to check the status of a service on a systemd system. Let's learn different commands used to list services on Centos/RHEL 7.x. [...]

# data[].attributes.attachment_link.readable_text
In this guide, I'm going to show you how to Install the latest Chrome and run it from Terminal on Ubuntu Linux. If you are open source fan, use Chromium which is the open source version of proprietary Google Chrome browser. Few differences exist between Chome and Chromium web browsers. The Google Update daemon which automatically updates Chrome to the latest version is not available for Chromium. Also, Chrome adds non-free codes like AAC, MP3, and H.264. These codecs are not available on Chromium. Chromium only includes limited support for HTML5 audio/video codec to what is available as non-proprietary codecs like WebM, Theora, VP9, etc.

We are going to install, run, update and uninstall Chrome using the terminal on Ubuntu 18.04, CentOS 7 and Arch Linux.

Install and Update Google Chrome on Ubuntu 18.04

a) Using Google repositories

For the terminal centric users, you can easily install latest Google Chrome browser using the official Google repositories. For doing this, create file named "google-chrome.list" in the "/etc/apt/sources.list.d" directory.

But first, you need to add the repository and install apt-key, use the commands:

Type in terminal the following command

sudo vim /etc/apt/sources.list.d/google-chrome.list

and add the following content into that file

deb http://dl.google.com/linux/chrome/deb/ stable main

or
use below one-liner

$ sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'

After adding Google repository to your sources, you need to get repository key with the following command

wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -

Update your sources by running the following command

sudo apt-get update

If all steps mentioned above are done, you can install Google Chrome using apt command.

sudo apt-get install google-chrome-stable

Note that you can also install beta and unstable versions of Chrome using the same repository. To do that use the following commands.

For beta:

sudo apt-get install google-chrome-beta

For unstable version of Chrome

sudo apt-get install google-chrome-unstable

Now you can run Chrome from terminal by running the following command

google-chrome &

This will run Google Chrome in background.

If you have already installed Google Chrome via apt and you want to upgrade to the latest version you can type the latest version install command in your terminal:

sudo apt-get install google-chrome-stable

or update your system by the following command

sudo apt-get update

b) Manually download Debian package

The easiest and most user-friendly way to install Chrome on Ubuntu is to download the .deb package from the official website and install it using the dpkg package manager for Debian based systems. Download Chrome installer from the link. Once you download the package, install it using

wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb

sudo dpkg -i google-chrome*.deb

sudo apt-get install -f

After this steps you can run Google Chrome via terminal by the command below:

google-chrome

or

google-chrome &

to run Chrome in background.

The installation process will add a PPA to your system so Google Chrome will receive the latest updates whenever you update your system.

To remove Google Chrome from your system type the command below:

sudo apt remove google-chrome-stable

Install Flash Player on Ubuntu

The flashplugin-installer package provides the NPAPI plug-in for Firefox and Chromium. To install Adobe Flash Plugin, you need to enable Canonical Partner repository which offers some proprietary applications that don't cost any money to use but are closed source.

# echo "deb http://archive.canonical.com/ubuntu xenial partner" >> /etc/apt/sources.list
# apt-get update
# apt-get install adobe-flashplugin

Install Chromium on Ubuntu

Since Chromium is an open source version of Chrome, its packages are distributed through official Ubuntu upstream repositories. You just need to update your apt cache index and install it. Use the commands:

$ sudo apt-get update
$ sudo apt-get install chromium-browser

If you need Pepper Flash Player - browser plugin

$ sudo apt-get install flashplugin-installer pepperflashplugin-nonfree

Chromium browser can easily be upgraded by running the commands:

$ sudo apt-get update
$ sudo apt-get upgrade chromium-browser

Install and Update Google Chrome on CentOS 7

To get the latest version of Chrome on your CentOS you need to add Google yum repository to your repos. To do this create file named google-chrome.repo in the /etc/yum.repos.d/ directory. Type in terminal the following command

sudo vim /etc/yum.repos.d/google-chrome.repo

Add the following lines into the file and save

[google-chrome]
 name=google-chrome
 baseurl=http://dl.google.com/linux/chrome/rpm/stable/$basearch
 enabled=1
 gpgcheck=1
 gpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub

After repository is enabled in your CentOS 7, you can type the following command to see information about latest stable version of Google Chrome

yum info google-chrome-stable

Output of the command will look like this

Available Packages
Name : google-chrome-stable
Arch : x86_64
Version : 66.0.3359.117
Release : 1
Size : 50 M
Repo : google-chrome/x86_64
Summary : Google Chrome
URL : https://chrome.google.com/
License : Multiple, see https://chrome.google.com/
Description : The web browser from Google
 :
 : Google Chrome is a browser that combines a minimal design with
 : sophisticated technology to make the web faster, safer, and
 : easier.

Record the Version of the latest Google Chrome and proceed to its installation using the following command

sudo yum install google-chrome-stable

This will install the latest stable Google Chrome. Just make sure the outputted version during the installation is the same as the one we saw in info above.

Once the installation process is finished you can open Google Chrome by typing the following command in terminal

google-chrome &

This will run the browser in background.

To upgrade already installed Google Chrome to the latest version, just type the install command in your terminal:

sudo yum install google-chrome-stable

Install and Update Google Chrome on ArchLinux

In ArchLinux the installation process of Google Chrome differs from CentOS and Ubuntu. You need to install the google-chrome package from AUR (Arch User Repository). To do this we need to find snapshot download URL of google-chrome package on AUR website. On the website, search for the desired package and find "Download snapshot". Copy link address by right clicking on the link. Then, using wget command, download the snapshot to your ArchLinux machine. For Google Chrome the command looks like this:

wget https://aur.archlinux.org/cgit/aur.git/snapshot/google-chrome.tar.gz

Uncompress the downloaded tar.gz file using the following command:

tar -xvzf google-chrome.tar.gz

and change the working directory to newly created one:

cd google-chrome

Use the following command to compile the package:

makepkg -s

After compile, you will have file with .xz extension in your directory. Type ls to view the content of the directory.

Now you can install Google Chrome with the following command:

sudo pacman -U google-chrome-66.0.3359.117-1-x86_64.pkg.tar.xz

To run Google Chrome on ArchLinux from terminal you must type:

google-chrome-stable

To remove Chrome from ArchLinux, run the following command in the terminal:

sudo pacman -R google-chrome

Google doesn't allow you to install older versions of the browser while you can download and install older versions of Firefox if you need it for any reason (e.g. testing webpage view in random browser versions). Hope this guide was helpful, if you encounter any issues, drop a comment and we'll be ready to help.

# data[].attributes.attachment_link.title
Download and Install Chrome on Linux | Chrome Browser Ubuntu

# data[].attributes.attachment_link.description
In this guide, I'm going to show you how to Install the latest Chrome and run it from Terminal on Ubuntu Linux. If you are open source fan, use Chromium which is the open source version of proprietary Google Chrome [...]

# data[].attributes.attachment_link.readable_text
Similar to the Command Prompt in Windows, Linux has the Terminal in order to help you configure and interact with your system. For someone to work in the Terminal they need to familiarize themselves with Linux commands. Once familiarized it is fairly easy to work from the Terminal and that is why most of the Linux workers prefer the Linux terminal over the GUI.

This article will help you to get familiarized with all the most common Linux commands and their usages. These commands are divided into 15 sections based on their functionalities.

System Related Commands

These commands are used to view and manage Linux system-related information.

1. uname : Displays linux system information. With -a switch you can view all the information, with -r switch you can view kernel release information and with -o you can view OS information2. cat /etc/redhat_release : Shows which version of redhat installed3. uptime : Shows how long the system has been running : Shows system host name. With -i switch you can view the ip address of the machine and with -d you can view the domain name5. last reboot : Shows system reboot history : Shows the current date and time. You can specify the format you want to view the date as well. As an example, by using 'date +%D' you can view the date in 'MM/DD/YY' format : Shows the calendar of the current month. With -y switch you can view the calendar of the whole current year8. w : Displays who is logged on and what they are doing : Shows current user id10. finger user : Displays information about user11. reboot : Reboots the system12. shutdown : Shuts down the system

Hardware Related Commands

These commands are used to view and manage hardware-related aspects of the Linux machine.

                 : Displays all the messages from Kernel ring buffer. With -k switch you can view kernel messages and with -u you can view userspace messages
14. cat /proc/cpuinfo : Displays information about processes and CPUs of the system15. cat /proc/meminfo : Displays details on hardware memory16. cat /proc/interrupts : Lists the number of interrupts per CPU per I/O device17. lshw : Displays information on hardware configuration of the system. But this command must be run as super user or it will only report partial information18. lsblk : Displays block device related information of the machine. With -a you can view all block devices19. free -m : Shows used and free memory (-m for MB)20. lspci -tv : Shows information on PCI buses devices21. lsusb -tv : Shows information on USB devices22. dmidecode : Shows hardware info from the BIOS (vendor details)23. hdparm -i /dev/sda : Shows info about disk sda hdparm -tT /dev/sda : Performs a read speed test on disk sda24. badblocks -s /dev/sda : Tests for unreadable blocks on disk sda

Statistic Related Commands

These set of commands are used to view various kinds of stats of the Linux system

25. mpstat 1 : Displays processors related statistics26. vmstat 2  : Displays virtual memory statistics27. iostat 2 : Displays I/O statistics28. tail -n 500 /var/log/messages : Displays the last 500 kernel/syslog messages29. tcpdump -i eth1 : Captures all packets flow on interface eth1. With -w switch you can specify a file where you can direct the output to tcpdump -i eth0 'port 80' : Monitors all traffic on port 80 on interface eth030. lsof : Lists all open files belonging to all active processes lsof -u testuser : Lists files opened by a specific user31. free -m : Shows RAM memory details32. watch df -h : Watches changeable disk usage continuously

User-Related Commands

These commands are used to manage Linux users

33. id : Shows the active user and group information. With -G switch you can view the IDs of groups34. last : Shows a list of last logins on the system. Using -a switch you can add the hostname to the last column of the output35. who : Shows who is logged on the system36. groupadd admin : Adds the group "admin"37. useradd -c "Sam Tomshi" -g admin -m sam : Creates user "sam" and adds to group "admin"38. userdel sam : Deletes user sam39. adduser sam : Adds user "sam"40. usermod : Modifies user information41. passwd user1 : Changes the password of user1

File Related Commands

These commands are used to handle files and directories

42. ls -al : Displays all information about files/directories. This includes displaying all hidden files as well43. pwd : Shows current directory path44. mkdir directory-name  : Creates a directory45. rm file-name : Deletes file rm -r directory-name : Deletes directory recursively rm -f file-name : Forcefully removes file rm -rf directory-name : Forcefully removes directory recursively46. cp file1 file2 : Copies linux files, here file1 to file2 cp -r dir1 dir2 : Copies dir1 to dir2, creates dir2 if it doesn't exist47. mv file1 file2 : Moves files from one place to another/renames file1 to file248. ln -s /path/to/target-directory-name link-dir : Creates a symbolic link to link-dir49. touch file : Creates empty file50. cat file : Prints the file content in terminal51. more file : Display the contents of file52. head file : Display the first 10 lines of file53. tail file : Outputs the last 10 lines of file tail -f file : Outputs the contents of file as it grows starting with the last 10 lines54. gpg -c file  : Encrypts file gpg file.gpg  : Decrypts file55. cksum file  : View the checksum of the file56. diff file1 file2  : View the differences between contents of file1 and file257. ln -s target-file link-file : Create a soft link named link-file to target-file58. sort : Sorts files in alphabetical order59. uniq : Compares adjacent lines in a file and removes/reports any duplicate lines60. wc : Counts number of words/lines61. dir : Lists the content of the directory62. tee : Command for chaining and redirection63. tr : Command for translating characters

Process Related Commands

These commands are used to handle Linux processes

64. ps : Displays your currently active processes ps aux | grep 'telnet' : Displays all process ids related to telnet process65. pmap : Display Memory map of process66. top  : Display all running processes and cpu/memory usage67. kill pid  : Kills process with mentioned pid68. killall proc  : Kills all processes named proc69. pkill processname : Sends kill signal to a process with its name70. bg  : Resumes suspended jobs without bringing them to foreground71. fg  : Brings the most recent job to foreground fg n  : Brings job n to the foreground

File Permission Related Commands

These commands are used to change permissions of the files

72. chmod octal file-name   : Changes the permissions of file to octal chmod 777 /data/test.c  : Sets rwx permission for owner , group and others chmod 755 /data/test.c : Sets rwx permission for owner and rx for group and others73. chown owner-user file  : Changes owner of the file chown owner-user:owner-group file-name : Changes owner and group owner of the file chown owner-user:owner-group directory  : Changes owner and group owner of the directory74. chgrp group1 file  : Changes the group ownership of the file to group1

Network Related Commands

These commands are used to view and edit network configurations related aspects of the system

75. ifconfig -a : Displays all network interface and set ip address76. ifconfig eth0  : Displays eth0 ethernet port ip address and details77. ip addr show  : Display all network interfaces and ip addresses78. ip address add 192.168.0.1 dev eth0  : Sets ip address of eth0 device79. ethtool eth0  : Linux tool to show ethernet status80. mii-tool eth0  : Linux tool to show eth0 status81. ping host  : Sends echo requests to the host to test ipv4 connection82. whois domain  : Gets who is information for domain83. dig domain  : Gets DNS nameserver information for domain dig -x host  : Reverse lookup host84. host google.com  : Lookup DNS ip address for the name85. hostname -i  : Lookup local ip address86. wget file  : Downloads file87. netstat -tupl  : Lists all active listening ports88. nslookup  : Resolves domain names to IP addresses

Compression / Archive Related Commands

These commands are used to compress and decompress files

89. tar cf home.tar home  : Creates a tar named home.tar containing home/ tar xf file.tar  : Extracts the files from file.tar tar czf file.tar.gz files  : Creates a tar with gzip compression90. gzip file  : Compresses file and renames it to file.gz91. bzip2 -z file  : Compresses file and renames it to file.bz2bzip2 -d file.bz2  : Decompress the file

Package Installation Related Commands

These commands are used to manage Linux packages

92. rpm -i pkgname.rpm : Installs rpm based package rpm -e pkgname : Removes package93. make : Install from source file

Search Related Commands

These commands are used to search for files and patterns

94. grep pattern files  : Searches for pattern in files grep -r pattern dir : Searches recursively for pattern in dir95. locate file  : Finds all instances of file96. find /home/tom -name 'index*'  : Finds file names that start with "index" inside /home/tom directory find /home -size +10000k  : Finds files larger than 10000k in /home

Login Related Commands

These commands are used to log into another host

97. ssh [email protected]  : Securely connect to a host as user ssh -p port $ [email protected]  : Connects to host using specific port98. telnet host  : Connects to the system using telnet port

File Transfer Related Commands

These commands are used to copy files from one system to another system

99. scp file.txt server2:/tmp  : Secure copy file.txt to remote host /tmp folder scp [email protected]:/www/*.html /www/tmp  : Copies *.html files from remote host to current host /www/tmp folder scp -r [email protected]:/www /www/tmp  : Copies all files and folders recursively from remote server to the current system /www/tmp folder100. rsync -a /home/apps /backup/  : Synchronizes source to destination rsync -avz /home/apps $ [email protected]:/backup : Synchronize files/directories between the local and remote system with compression enabled

Disk Usage Related Commands

These commands are used to view disk statistics

101. df -h  : Shows free space on mounted filesystems df -i 	 : Shows free inodes on mounted filesystems102. fdisk -l	 : Shows disks partitions sizes and types103. du -ah  : Displays disk usage in human readable form du -sh  : Displays total disk usage on the current directory104. findmnt  : Displays target mount point for all filesystems105. mount device-path mount-point  : Mounts a device to the device-path

Directory Traverse Related Commands

These commands are used to change the directory

106. cd ..  : Goes up one level of the directory tree cd	 : Goes to $HOME directory cd /test  : Changes to /test directory

Apart from the commands mentioned in this guide, there are various options/switches could be used along. But this article only focuses on the most common commands that are useful for day-to-day activities and if you need more information on them, you can always use the 'man' command on Linux.

# data[].attributes.attachment_link.description
Similar to the Command Prompt in Windows, Linux has the Terminal in order to help you configure and interact with your system. For someone to work in the Terminal they need to familiarize themselves with Linux commands. Once familiarized it [...]

# data[].attributes.headline
How Chown Recursively Change File/Directory Ownership in Linux

# data[].attributes.subject
How Chown Recursively Change File/Directory Ownership in Linux

# data[].attributes.body
The chown command in Linux is used to change the ownership and group ownership of a files/directories. In Linux, all files, directories and processes (which are again files) are owned by users. The group is a set of users that share the same access permissions (i.e., read, write and execute) for that objects(files/directories).

# data[].attributes.attachment_link.readable_text
The chown command in Linux is used to change the ownership and group ownership of a files/directories. In Linux, all files, directories and processes (which are again files) are owned by users. The group is a set of users that share the same access permissions (i.e., read, write and execute) for that objects(files/directories).

You should have root access or su login to perform chown command and use ls command to list ownership information of the objects.

In this article, I will show you how to use the chown command with examples

1) Change Ownership

To change the ownership of a file, chown is provided with two arguments, the new owner and the file whose owner is to be changed.

The root user is the owner of the file, chown commands makes raghu user the new owner.

2) Changing owner and group

If the owner is followed by a colon and a group name (without spaces), the group name is changed as well.

Now the new owner of the file is raghu and the new group owner is altair group.

Now, in this syntax involving colon, if a colon but no group name follows the user name, the given user is made the owner of the file and that user's login group is made as the group owner of the file.

If the colon and group are mentioned, only the group of the file is changed. In this case, the command works like chgrp command.

3) Changing permissions for directories recursively

The ownership of the directories and files contained in them can be changed recursively with -R option.

# ls -l /home/jones/
total 12
-rw-rw-r-- 1 jones javaproject 0 Aug 19 2012 file1
drwxrwxr-x 2 jones jones 4096 Aug 19 2012 hello

# chown -R raghu /home/jones/

# ls -l /home/jones/
total 12
-rw-rw-r-- 1 raghu javaproject 0 Aug 19 2012 file1
drwxrwxr-x 2 raghu jones 4096 Aug 19 2012 hello

4) Verbose output

The --verbose option shows all the ownership changing. It outputs the diagnostics for each file processed

# chown -R --verbose jones /home/jones/
changed ownership of `/home/jones/hello' to jones
changed ownership of `/home/jones/.emacs' to jones
changed ownership of `/home/jones/.bash_history' to jones
changed ownership of `/home/jones/.bash_logout' to jones
changed ownership of `/home/jones/.bashrc' to jones
changed ownership of `/home/jones/file1' to jones
changed ownership of `/home/jones/.mozilla/plugins' to jones
changed ownership of `/home/jones/.mozilla/extensions' to jones
changed ownership of `/home/jones/.mozilla' to jones
changed ownership of `/home/jones/.bash_profile' to jones
changed ownership of `/home/jones/' to jones

The verbose option outputs processing of each file even when the changes are not made. But with -c or --changes option, the output is reported only when changes are made. For example,

# chown -R --verbose jones /home/jones/
ownership of `/home/jones/hello' retained as jones
ownership of `/home/jones/.emacs' retained as jones
ownership of `/home/jones/.bash_history' retained as jones
ownership of `/home/jones/.bash_logout' retained as jones
ownership of `/home/jones/.bashrc' retained as jones
ownership of `/home/jones/file1' retained as jones
ownership of `/home/jones/.mozilla/plugins' retained as jones
ownership of `/home/jones/.mozilla/extensions' retained as jones
ownership of `/home/jones/.mozilla' retained as jones
ownership of `/home/jones/.bash_profile' retained as jones
ownership of `/home/jones/' retained as jones

# chown -R -c jones /home/jones/

5) Silent operation

The normal users cannot change the ownership of files owned by others. So an error is displayed when a normal user tries to change the ownership.

[[email protected] ~]$ chown raghu /etc/
chown: changing ownership of `/etc/': Operation not permitted

But if we use -f or --silent or --quiet option, the error is not displayed.

[[email protected] ~]$ chown -f raghu /etc/
[[email protected] ~]$

6) Preserve root

To prevent changing the ownership of / directory recursively, --preserve-root is used.

[[email protected] ~]# chown -R --preserve-root raghu /
chown: changing ownership of `/proc/1/task/1/fd/10': Permission denied
chown: changing ownership of `/proc/1/task/1/fd': Permission denied
chown: changing ownership of `/proc/1/task/1/fdinfo/10': Permission denied
chown: changing ownership of `/proc/1/task/1/fdinfo': Permission denied
chown: changing ownership of `/proc/1/task/1/environ': Permission denied
chown: changing ownership of `/proc/1/task/1/auxv': Permission denied
chown: changing ownership of `/proc/1/task/1/status': Permission denied
<--output-truncated-->

# data[].attributes.attachment_link.title
Linux Chown Command to Change File/Directory Ownership Recursively

# data[].attributes.attachment_link.description
The chown command in Linux is used to change the ownership and group ownership of a files/directories. In Linux, all files, directories and processes (which are again files) are owned by users. The group is a set of users that share [...]

# data[].attributes.headline
Learn Methods to Install and Use TensorFlow in Ubuntu

# data[].attributes.subject
Learn Methods to Install and Use TensorFlow in Ubuntu

# data[].attributes.body
TensorFlow is an open-source deep learning software system built by Google to train neural networks. Check out our blog to read more about TensorFlow.

# data[].attributes.attachment_link.readable_text
TensorFlow is an open-source deep learning software system built by Google to train neural networks.TensorFlow can perform image recognition, human language audio recognition and solving partial differential equations.

We will install TensorFlow and all of the packages required to use TensorFlow in a Python virtual environment on Ubuntu. This isolates your TensorFlow environment from other Python programs on the same machine.

Step 1) Installing TensorFlow

we are going to create a virtual environment and install TensorFlow.
First, create a project directory called tf-test:

$ mkdir ~/tf-test

And navigating to our newly created tf-test directory:

$ cd ~/tf-test

Now we are going to create a new virtual environment tensorflow-venv. Run the following command to create the environment:

$ python3 -m venv tensorflow-venv

Run the command below to activate the environment.

$ source tensorflow-venv/bin/activate

Run the following command to install and upgrade to the newest version of TensorFlow available in PyPi.

(tensorflow-venv)$ pip install --upgrade tensorflow

Output

Collecting tensorflow
  Downloading tensorflow-1.4.0-cp36-cp36m-macosx_10_11_x86_64.whl (39.3MB)
    100% |████████████████████████████████| 39.3MB 35kB/s

...

Successfully installed bleach-1.5.0 enum34-1.1.6 html5lib-0.9999999 markdown-2.6.9 numpy-1.13.3 protobuf-3.5.0.post1 setuptools-38.2.3 six-1.11.0 tensorflow-1.4.0 tensorflow-tensorboard-0.4.0rc3 werkzeug-0.12.2 wheel-0.30

Now we will give examples using tensorflow.

Example 1) Simple Constants

To create a simple constant with Tensorflow, which TF stores as a tensor object:

>>> import tensorflow as tf

We will create string constant as follow:

>>> hello = tf.constant('Hello World')

To know the type of object hello:

>>> type(hello)

    output
    tensorflow.python.framework.ops.Tensor

We will create integer constant as follow:

>>> x = tf.constant(300)

>>> type(x)

    output
    tensorflow.python.framework.ops.Tensor

Example 2) Running Sessions

Now we can create a TensorFlow Session, which is a class for running TensorFlow operations.

>>> sess = tf.Session()

>>> sess.run(hello)

    output
    b'Hello World'

b for unicode indication.

>>>type(sess.run(hello))

    output
    bytes

for the second constant.

>>> sess.run(x)

    output
    300

>>>type(sess.run(x))

    output
    numpy.int32

Example 3) Operations

We can line up multiple Tensorflow operations in to be run during a session:

    >>> x = tf.constant(20)
    >>> y = tf.constant(30)

    >>> with tf.Session() as sess:
            print('Operations with Constants')
            print('Addition',sess.run(x+y))
            print('Subtraction',sess.run(x-y))
            print('Multiplication',sess.run(x*y))
            print('Division',sess.run(x/y))

    output
    Operations with Constants
    Addition 50
    Subtraction -10
    Multiplication 600
    Division 0.666666666667

Example 4) Placeholder

We may not always have the constants right away, and we may be waiting for a constant to appear after a cycle of operations. tf.placeholder is a tool for this. It inserts a placeholder for a tensor that will be always fed.

Note: This tensor will produce an error if evaluated. Its value must be fed using the feed_dict optional argument to Session.run().

    >>> x = tf.placeholder(tf.int32)
    >>> y = tf.placeholder(tf.int32)

We are going to define operations.

    >>> add = tf.add(x,y)
    >>> sub = tf.sub(x,y)
    >>> mul = tf.mul(x,y)

We are going to create dictionary to make operations on it.

>>> d = {x:20,y:30}

    >>> with tf.Session() as sess:
            print('Operations with Constants')
            print('Addition',sess.run(add,feed_dict=d))
            print('Subtraction',sess.run(sub,feed_dict=d))
            print('Multiplication',sess.run(mul,feed_dict=d))

    output
    Operations with Constants
    Addition 50
    Subtraction -10
    Multiplication 600

Example 5) Matrix Multiplication

Now we are going to use matrix multiplication. First we need to create the matrices:

>>> import numpy as np

    >>> a = np.array([[5.0,5.0]])
    >>> b = np.array([[2.0],[2.0]])

>>> print(a)

    output
    array([[ 5.,  5.]])

>>> print(a.shape)

    output
    (1, 2)

>>> print(b)

    output
    array([[ 2.],
       [ 2.]])

>>> print(b.shape)

    output
    (2, 1)

Now we are going to create constant tensor objects.

    >>> mat1 = tf.constant(a)
    >>> mat2 = tf.constant(b)

The matrix multiplication operation:

>>> matrix_multi = tf.matmul(mat1,mat2)

Now we run the session to perform the Operation:

    >>> with tf.Session() as sess:
            result = sess.run(matrix_multi)
            print(result)

    output
    [[ 20.]]

Thanks for reading and please leave your comments below.

Suggested Reading

# data[].attributes.attachment_link.title
How to Use and Install TensorFlow in Ubuntu

# data[].attributes.attachment_link.description
TensorFlow is an open-source deep learning software system built by Google to train neural networks.TensorFlow can perform image recognition, human language audio recognition and solving partial differential equations. We will install TensorFlow and all of the packages required to use [...]

# data[].attributes.headline
"4 Commands to Shutdown Linux from Terminal

# data[].attributes.subject
"4 Commands to Shutdown Linux from Terminal

# data[].attributes.body
How can you shut down your system successfully using a command? According to the manual page of shutdown command, shutting down a system means bringing the system down in a secure way. This article discusses the commands you can use to shut down your Linux box.

# data[].attributes.attachment_link.readable_text
How can you shut down your system successfully using a command? According to the manual page of shutdown command, shutting down a system means bringing the system down in a secure way. This article discusses the commands you can use to shut down your Linux box.

Shutting down your Linux

The simplest of the commands for shutdown is the 'shutdown' command. The following examples show how this command can be used to bring down the system:

1) Shutdown Command

The format for shutdown command is

shutdown [OPTION]... TIME [MESSAGE]

The time can be given in 24 hour format HH:MM or +m, where m is the number of minutes to wait before shutting down the system.

* The system can be shut down immediately by providing "now" in place of time. For example

$ shutdown -h now

will bring down the system immediately.

* To shutdown the machine after given number of minutes, for example

$ shutdown -h +3

Broadcast message from root (pts/0) (Tue Nov 6 00:23:48 2012):

The system is going DOWN for system halt in 3 minutes!

* In 24 hour format,

$ shutdown -h 00:45

Broadcast message from root (pts/0) (Tue Nov 6 00:30:54 2012):

The system is going DOWN for system halt in 15 minutes!

* A custom message can also be provided

$ shutdown -h +5 "Save your work."

Broadcast message from root (pts/0) (Tue Nov 6 00:43:48 2012):

Save your work.
The system is going DOWN for system halt in 5 minutes!

* The shutdown command waits for command completion before giving back the prompt. So it can be cancelled with ctrl+c. Shutdown can also be cancelled with the -c option.

2) Poweroff Command

Another command that can be used for bringing down the system is poweroff command

$ poweroff

Broadcast message from root (pts/0) (Tue Nov 6 09:39:17 2012):

The system is going down for system halt NOW!

3) Halt Command

The halt command will also shut down the system.

$ halt

Broadcast message from root (pts/0) (Tue Nov 6 09:42:43 2012):

The system is going down for system halt NOW!

4) Init Command

The init command is used to change the runlevel of the Unix/Linux system. These system runlevels are 0-6. The runlevel 0 is used for system halt. The following command will shut down the system:

$ init 0
INIT: Switching to runlevel: 0
INIT: Sending processes the TERM signal

Unlike other commands we have seen so far, the init command will not broadcast any message about system halt.

5) systemctl Commands

Now systemctl utility replaces a number of power management commands and even the shutdown command will call systemctl utility to perform the shutdown tasks.

Shutdown system and poweroff the machine. Send notification to all logined users

systemctl poweroff

Shutdown the system but won't poweroff the machine. Send notification to all logined users.

systemctl halt

Poweroff the machine but won't send any notification to all logined users.

systemctl --no-wall poweroff

To display shutdown details run below command

journalctl -u systemd-shutdownd

# data[].attributes.attachment_link.title
Commands to Shutdown Linux from Terminal with Examples

# data[].attributes.attachment_link.description
How can you shut down your system successfully using a command? According to the manual page of shutdown command, shutting down a system means bringing the system down in a secure way. This article discusses the commands you can use [...]

# data[].attributes.headline
How to Update and Install Latest Chrome in Linux/Ubuntu

# data[].attributes.subject
How to Update and Install Latest Chrome in Linux/Ubuntu

# data[].attributes.headline
Linux Netstat Commands with Basic and Advanced Examples

# data[].attributes.subject
Linux Netstat Commands with Basic and Advanced Examples

# data[].attributes.body
https://linoxide.com/linux-how-to/linux-netstat-commands-basic-advanced-examples/

# data[].attributes.headline
Updating and Installing Latest Chrome in Ubuntu Linux

# data[].attributes.subject
Updating and Installing Latest Chrome in Ubuntu Linux

# data[].attributes.body
https://linoxide.com/linux-how-to/install-latest-chrome-run-terminal-ubuntu/

# data[].attributes.headline
How to Delete or Remove a User on Ubuntu

# data[].attributes.subject
How to Delete or Remove a User on Ubuntu

# data[].attributes.body
https://visual.ly/community/Infographics/computers/how-delete-or-remove-user-ubuntu