What is Shell in Linux?

The Command Line Interface (CLI) is more popularly known as Shell and sometimes also referred to as prompt or terminal. It provides you with a text interface where you can write your command and the Shell will execute the corresponding task. As there are different distributions and flavors of Linux there are also different flavors of Shell. Each flavor has its own specific commands for various tasks and has its own benefits.

The Shell is one of the core features of Linux. You can use it to perform from the simplest of tasks to much complicated tasks.

Types of Linux Shell

Bourne Shell

This shell is fast and simple. However, simplicity means that it has less features than other types of shells. It is suitable for newbies but not experts.

Bash Shell

The Bash Shell, short for Bourne Again Shell, is one of the most popular shells that you may find in many Linux distributions. It provides many features while thriving to be simple.

C Shell

It was created by Bill Joy. It provides many features like aliases and command history for interactive use. Moreover, it also includes features like built-in arithmetic and C-like expression syntax to make programming easier.

TENEX C Shell

It is a modified version of C shell. It has many improvements like better history control, terminal locking, and read only variables. The shell also includes spell check and auto-completion features. Even after these modifications, it is fully compatible with C shell.

Korn Shell

It was developed by David Korn. It includes many features of Bourne shell and C shell. In addition to this, it also has its own unique features that make it even better.

Z Shell

It basically a modified version of Bourne shell. It incorporates features like better option handling, loadable modules and compatibility modes.

Fish Shell

Fish shell, short for friendly-interactive shell, aims to be more user friendly and interactive than any other shell.

What is Arch Linux?

Arch Linux is a free and open-source operating system. It is a Linux distribution which means that a Linux based OS. It is specifically created for computers based on  x86-64 architecture. It is developed by a team of developers, the lead developer of which was Aaron Griffin. The main goal of the organization is to provide an operating system that is simple and lightweight yet also flexible.

You can download Arch Linux by clicking here.

Why do you need to download Arch Linux?

The first thing that you should keep in mind before choosing to download Arch Linux is that it is not for beginners. It is not easy to set up and definitely not easy to run for newbies. However, if you are willing to learn how Linux based environment work or if you have some experience then you should certainly try this OS. Here are the features that make Arch Linux so great.

Features

Detailed Guides and Wiki: For help regarding the OS you can go to its website’s Wiki page which you can access by clicking here. There is a ton of information available there to guide you. Therefore, even if you are a beginner but enthusiastic in learning, with these guides and a bit of googling, you’ll be a pro in no time.

Customization: It takes a lot of time and knowledge just to install the OS. However, this is one of the reasons that makes it so great. All this effort that you spend on setting Arch Linux up means that you can customize it greatly. During the installation process, you can choose whether to add or not many features. Therefore, in the end, you are left with a system that only has things that you want.

Rolling release: What is meant by rolling release? It means that the operating system is continuously updated so the core of the system is always up to date. Consequently, you get the latest software, features and fixes.

Linux system administrators need to configure networking on their systems. On desktop machines, you can use dynamic IP addresses but on server infrastructure, you will need to set up a static IP address for a stable connection.

IP addresses on Linux systems are mostly assigned automatically by Dynamic Host Configuration Protocol (DHCP) servers. These are referred to as “dynamic addresses” and can change any time the system is rebooted. When a system is on a server or will be remotely administered, it is more convenient for these systems to have static addresses, offering stable and consistent connections with users and applications.

Fortunately, the steps required to setup a Linux system’s IP address from dynamic to static are fairly easy, though they will be a little different for the various distribution you are using. In this post, we’ll look at how this task is managed on RHEL/CentOS/Fedora and Debian/Ubuntu systems.

IP address: 192.168.0.100 Netmask: 255.255.255.0 Hostname: node01.linux-documentation.com Domain name: linux-documentation.com Gateway: 192.168.0.1 DNS Server1: 8.8.8.8 DNS Server2: 4.4.4.4

Configure Static IP Address in RHEL/CentOS/Fedora:

To configure the static IP address in RHEL / CentOS / Fedora, you will need to edit these files:

/etc/sysconfig/network
/etc/sysconfig/network-scripts/ifcfg-eth0

Where in the above "ifcfg-eth0" answers to your network interface namedeth0. If your interface is named “eth1" then the file that you have to edit is "ifcfg-eth1".

Let’s start editing the first file:

# vi /etc/sysconfig/network

Open that file and set the following:

NETWORKING=yes HOSTNAME=node01.linux-documentation.com GATEWAY=192.168.0.1 NETWORKING_IPV6=no IPV6INIT=no 

Now open next file as shown below:

# vi /etc/sysconfig/network-scripts/ifcfg-eth0

Note: Make sure that you have opened the file corresponding to your network interface. You can get your network interface name using command ifconfig -a.

In that file you have to make the following changes:

DEVICE="eth0" BOOTPROTO="static" DNS1="8.8.8.8" DNS2="4.4.4.4" GATEWAY="192.168.0.1" HOSTNAME="node01.linux-documentation.com" HWADDR="00:19:99:A4:46:AB" IPADDR="192.68.0.100" NETMASK="255.255.255.0" NM_CONTROLLED="yes" ONBOOT="yes" TYPE="Ethernet" UUID="8105c095-799b-4f5a-a445-c6d7c3681f07"

You will only need to edit the settings for i.e enter their respective values and save the file:

  1. DNS1 and DNS2
  2. GATEWAY
  3. HOSTNAME
  4. NETMASK
  5. IPADDR

Other settings should have already been predefined.

Next edit resolve.conf file by opening it with a text editor like nano or vi:

# vi /etc/resolv.conf
  
nameserver 8.8.8.8 # Replace with your nameserver ip
nameserver 4.4.4.4 # Replace with your nameserver ip

Once you have made your changes restart the networking with the following commands:

# /etc/init.d/network restart  [On SysVinit] 
# systemctl restart network [On SystemD]

Set Static IP Address in Debian / Ubuntu

To setup static IP address in DebianUbuntu, you have to open the following file:

# nano /etc/network/interfaces

You will see a line looking like this:

auto eth0
iface eth0 inet dhcp

Change it so it looks like this:

auto eth0
iface eth0 inet static 
  address 192.168.0.100
  netmask 255.255.255.0
  gateway 192.168.0.1
  dns-nameservers 4.4.4.4
  dns-nameservers 8.8.8.8

Save the file and then edit /etc/resolv.conf as follows:

# nano /etc/resolv.conf
nameserver 8.8.8.8 # Replace with your nameserver ip 
nameserver 4.4.4.4 # Replace with your nameserver ip

Restart the networking on your system with the following commands:

# /etc/init.d/network restart  [On SysVinit]
# systemctl restart network [On SystemD]

Your static IP address has been successfully configured.

Now, you know how to configure a static IP address on a Linux distro.

An Overview of Ubuntu and Fedora

Both Ubuntu and Fedora are Linux distributions. Ubuntu is developed by Canonical Ltd. and is based on Debian while Fedora is developed by  Fedora Project which is sponsored by Red Hat. Both operating systems are free and open-source software. Now that you have read the introduction to the OS let’s move on to the comparison of Ubuntu and Fedora.

Comparison

Latest technology integration: When it comes to the latest technology Fedora is unmatched. Although Ubuntu also strives to integrate latest technology, Fedora is just faster at it. Fedora claims to be a bleeding-edge operating system. It means that it provides frequent changes as technology progresses which might have some downfalls as explained later.

Stability: When it comes to stability Ubuntu is more stable than Fedora and the reason for that is the priorities of the two organizations. As mentioned above Fedora is an operating system that aims to provide you with the newest software faster than others. Contrary to which Ubuntu aims for stability. That is the reason why Ubuntu falls a bit behind in providing such technology as before any such update is released the developers make sure that it is totally stable, and they take their time in doing so. However, it doesn’t mean that Fedora is unstable. It is just that since it has to provide updates faster sometimes it may have bugs.

Frequency of updates: Fedora has more frequent updates than Ubuntu. This feature has its pros and cons. The advantage that you get from frequent updates is that you get the latest stuff and the disadvantage is that you get a system that is constantly changing, and you must adapt to that. Therefore, it is not suitable for purposes that require consistency such as for server purposes for which you might prefer Ubuntu.

Ease of Use: Although both OS are very user-friendly, there are some things that you will find easier to do on Ubuntu than Fedora such as downloading proprietary software.

An Overview of Debian and Ubuntu

Debian and Ubuntu are both Linux Distributions i.e. Linux based operating systems. Debian is one of the oldest Linux distributions and ‘The Debian Project’ are its developers. As for Ubuntu, it is based on Debian like many modern OS and Canonical Ltd. developed this OS. Both software are free and opensource. Now that you know a bit about them, let’s jump to what you came here for that is the comparison of the two distros (short for Linux Distributions).

Comparison

Stability: Debian is considered more stable than Ubuntu. This is because it has less frequent releases that are thoroughly tested for any errors and bugs before they are made available. As for Ubuntu, it has more frequent releases. Moreover, it is based on the testing branch of Debian rather than stable branch, therefore, it is more susceptible to errors.

Ease of use: When it comes to new users that don’t know much about Linux Ubuntu is better to start off with. It is more user-friendly, and its GUI has a Windows-feel to it. While Debian is more suitable for experienced Linux users. It requires a lot of configuration that newbies wouldn’t understand. Whereas for experts it provides them with an opportunity to tailor the system to their liking.

Releases: Ubuntu has more frequent releases than Debian and its LTS (long term support) releases have support for up to five years. In addition to this, its releases are also regular. This ensures that you get the latest technology timely. On the other hand, Debian releases are less frequent and unscheduled. Its LTS releases have support for three years only. This means that you might not always get the newest stuff on Debian and you do not know when you should expect the updates.

Hardware Requirements: Debian works better on lower-end hardware than Ubuntu. The reason is that Ubuntu adds more features and patches to Debian which makes it heavier. Therefore, Debian is lighter weight and faster than it.

What is Ubuntu and What are Official Ubuntu Flavors?

Ubuntu is a Linux distribution that is open-source and free to download. It is one of the most popular Linux distributions. Official Ubuntu Flavors or Flavors of Ubuntu is just another way of saying different versions of Ubuntu that are released by Canonical Ltd. which is the developer of Ubuntu. Each flavor is developed for different use. Here is a brief overview of each official Ubuntu flavor.

Kubuntu

Kubuntu is popular for its KDE plasma workspace and modern look. It doesn’t require high-end hardware but would not work on very low hardware either. It also lets you customize your desktop.

Lubuntu

It is a lightweight and fast distribution. This OS strives to be user-friendly and energy conserving. It can run smoothly on low-end hardware. It has a Windows-like interface however it isn’t modern looking.

Ubuntu Budgie

As its name implies the distribution uses Budgie desktop environment. It aims to be a simple, user-friendly and elegant OS. It incorporates panel based menu-driven system which is also customizable.

Ubuntu Kylin

This Ubuntu flavor is customized and personalized for the needs of Chinese users. It includes Chinese language and other features to accommodate them.

Ubuntu MATE

This OS also aims for simplicity. It is a replacement of and also the upgraded version of Ubuntu’s previous default desktop that is GNOME 2 desktop. It gives you a lightweight and fast environment with low hardware requirements. Moreover, it provides you with a new interface that gives traditional vibes.

Xubuntu

It incorporates Xfce, which is a desktop environment that is lightweight and stable. Moreover, it is also customizable. The OS can work on low hardware while keeping an elegant and user-friendly interface.

Ubuntu Studio

It also comes with the Xfce desktop environment however, it is aimed at multimedia content creators. The OS includes audio and video tools straight out of the box. It fulfills all the needs for graphic designing, video creation and audio editing that are needed by professionals.  

We have gone through certain Linux Shell Commands in our Part I article. Let’s see a few more basic Linux commands here.

The rm command:

This command is used to remove a file or directory. The -rf option is to remove a file or directory recursively. You must use this command carefully i.e if you run this command in the home directory, or any other important directory, it will delete everything there without confirmation. -f stands for force, it will perform the delete action forcefully. So, please be careful while using this command.

root@monitor:/home# ls
ansible ec2-automate-backup.sh ssbackup.py test
dir1 ssbackup.log ssbackup.py-bak ubuntu
root@monitor:/home# rm -rf test
root@monitor:/home# ls
ansible ec2-automate-backup.sh ssbackup.py ubuntu
dir1 ssbackup.log ssbackup.py-bak
The cp command:

The cp command used to copy a file in the Linux shell. To copy a file/directory recursively use the cp command with the -r flag. For example, we are coping test1.txt to test2.txt

root@monitor:/home# cp test1.txt test2.txt
root@monitor:/home# ls -l
-rw-r--r-- 1 root root 0 Jan 23 16:46 test1.txt
-rw-r--r-- 1 root root 0 Jan 23 16:46 test2.txt

In the below example we are copying test dir to /tmp folder :

root@monitor:/home# cp test /tmp/
The mv command:

The mv command is used to rename or move a file or a directory. In following example we are renaming test1.txt to test.txt.

root@monitor:/home# mv test1.txt test.txt
root@monitor:/home# ls -l
-rw-r--r-- 1 root root 0 Jan 23 16:46 test2.txt
-rw-r--r-- 1 root root 0 Jan 23 16:46 test.txt

In the below example we will move file test.txt to /tmp directory.

root@monitor:/home# mv test.txt /tmp/
root@monitor:/home# cd /tmp/
root@monitor:/tmp# ll | grep test.txt
-rw-r--r-- 1 root root 0 Jan 23 16:46 test.txt
The wc command:

wc is a useful command to count newline, word and bytes of a file

root@monitor:/home# cat test.txt
HI that is a file.
This is the second line.
And we also have a third line.
root@monitor:/home# wc -l test.txt
3 test.txt
root@monitor:/home# wc -w test.txt
17 test.txt

The -l flag is to find the number of lines in a file, -w is to count the number of words in the file.

The echo command:

The echo command echoes a given string to the display.

 $ echo "Hello"
Hello
Redirecting the command output

we can redirect the command output to a file, or as input to another command. | is the most common way to do so. Using this we can count the number of directories in the root (/) directory very easily.

$ ls / bin boot dev etc home lib lib64 lost+found media mnt opt proc root run ˓→sbin srv sys tmp usr var 
$ ls / | wc -w
20
Using > to redirect output to a file!

You can use > to redirect the output of one command to a file, if the file exists this will remove the old content and only keep the input. We can use >> to append to a file, means it will keep all the old content, and it will add the new input to the end of the file.

$ ls / > details.txt 
$ cat details.txt
bin boot dev etc home lib lib64 lost+found media mnt opt proc root run sbin srv sys tmp usr var $ ls /usr/ > details.txt $ cat details.txt bin games include lib lib64 libexec local sbin share src tmp
$ ls -l /tmp/ >> details.txt
$ cat details.txt
bin games include lib lib64 libexec local sbin share src tmp
total 776
-rwxrwxr-x. 1 fedora fedora 34 Jun 24 07:56 helol.py
-rw-------. 1 fedora fedora 784756 Jun 23 10:49 tmp3lDEho
The man pages.

The man command shows the system’s manual pages. You can use this command to view the help document (manual page) for any command.

Syntax:

man section command. 

Example : man 7 signal.

Linux shell or the terminal is the lifeline of developers to manage their computer systems and data. Things which can be done on the GUI can be done much efficiently on the terminal by using commands. One can not remember all the commands, but with regular usage, one will be familiar with them. The following guide will introduce you to some basic Linux Shell Commands required to use your Linux system efficiently.

Gnome Terminal

Below, you can see a screenshot of the Gnome terminal application. As you can see the command prompt contains the following information:

 [username@hostname directoryname]  

In our case the username is root, hostname is monitor and directory is /root(~).

Gnome- Linux Shell Commands
Gnome Terminal

A terminal and a shell:

Read the articles on Wikipedia to learn about computer terminals and the shell.

Date command:

The date command shows the current date and time.

$ date 
Tue Jan 22 10:13:44 IST 2019

If you want to see the current date and time in UTC you can run the command as follows:

 $ date -u 
Cal command:

The cal command will display calendar in your shell, by default it displays current month.

 $ cal 
January 2019
Su Mo Tu We Th Fr Sa
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31

$cal Feb 2019
February 2019
Su Mo Tu We Th Fr Sa
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28
The whoami command:

This command will let you know the user account to which you are logged in on the shell.

$whoami
root
The id command:

This command returns user id, group id and groups of the current user.

$ id 
uid=0(root) gid=0(root) groups=0(root)
The pwd command:

The pwd command displays absolute path of current directory.

root@monitor:~# pwd
/root
The cd command:

This command will help you change directory on the shell. In the following example we will move to /etc/ directory.

root@monitor:~# pwd
/root
root@monitor:~# cd /etc/
root@monitor:/etc# pwd
/etc
The . directory and .. directory:

. and .. has special meaning in the Linux. i.e . means current directory and .. means parent directory.

root@monitor:/etc# cd .. 

This command will move us to the parent directory.

The ls command:

The ls command will display the files and directories inside the given directory. If you use the ls command without any argument, then it will return the output for the current directory. Here is the example:

root@monitor:/# ls
bin etc key.txt lost+found opt run srv usr
boot home lib media proc sbin sys var
dev initrd.img lib64 mnt root scripts tmp vmlinuz
root@monitor:/# ls home
ansible ssbackup.log ssbackup.py-bak
ec2-automate-backup.sh ssbackup.py ubuntu

In last command, we provided a path as the argument to the ls command.

The mkdir command:

Using the mkdir command you can create new directory. For example , we are creating test directory in home directory.

root@monitor:/home# mkdir test
root@monitor:/home# ls
ansible ssbackup.log ssbackup.py-bak ubuntu
ec2-automate-backup.sh ssbackup.py test

We can also create directories in a recursive way using -p option:

root@monitor:/home# mkdir -p  dir1/dir2/dir3
root@monitor:/home# ls
ansible ec2-automate-backup.sh ssbackup.py test
dir1 ssbackup.log ssbackup.py-bak ubuntu
root@monitor:/home# ls dir1
dir2
root@monitor:/home# ls dir1 dir1/dir2/
dir1:
dir2
 dir1/dir2/:
dir3

We will learn further basic commands in Part II.

Today we will review Bitpanda, perhaps one of the most successful European cryto trading platform.

Bitpanda the company

Bitpanda is a company based in Austria. It’s relatively new company, only starting out in the year 2014. However, just in 5 short years Bitpanda has become the leading crypto platform in Europe. As of September 2019, Bitpandas team has over 120 members servicing over 1 million users on the platfrom. A number which is growing daily. Bitpanda is arguably the biggest but undoubtedly the most innovative platform available.

A little bit about it’s services

These are not your typical crypto trading platform services. Because some of the investments Bitpanda has done are going to revolutionize the way we use crypto.

  • Bitpanda platform – The regular trading platform
  • Bitpanda Grand Exchange – An advanced trading marketplace
  • The Bitpanda swap – Exchange currencies for currencies, without using FIAT
  • A savings feature – Automated purchasing machine to increase your portfolio
  • The 100% secure and insured Bitpanda Metals – For trading precious materials such as gold and silver
  • The innovative Bitpanda To Go – Prepaid vouchers available for depositing on the platform available in Austria
  • The revolutionary Bitpanda Ecosystem Token – Utility currency available for trade on Bitpanda which offers discounts and rewards. A currency that raised 43,6m EUR in IEO for the company.
  • Pantos – A new state of the art multi-blockchain token system

Why should you use the Bitpanda Platform?

Firstly, it’s a company that continuously invests and advances itself. Secondly, it’s a growing community of traders. Lastly, it’s really cheap. Even more so, the interface and marketplace are very easy to navigate. Even the most inexperienced trader can enter the crypto world using Bitpanda, something very few other platforms can boast about.

We warmly recommend using Bitpanda. Start out small and enter the amazing world of online trading.

If you wish to learn more about Bitpanda, we strongly recommend reading this Bitpanda review. However, It is not merely a brochure but also as a guide to get started.

To read about Linux file access permissions please refer our other article here. It will help you understand the Linux files/directories permissions structure.

If you have ownership of a file or directory then you can change access permission of that file for other users. The image given below is showing the permission structure used in Linu.

To change ownership of a file or directory in Linux you have to use chmod command followed by the following attributes.

  • The user for whom you want to change the permission.
  • The type of access permission to add, remove or assign.
  • The list of files and directories for whom you want to change the permissions separated by spaces.

You can change access permission for the users who are in the following categories:

  • the owner of the file (user, u)
  • the group that own the file (group, g)
  • the other users (others, o)

Access permissions refers to read(r),write(w) and execute(x).

As the root user, you can also change the ownership of a file or directory using the chown command.

For example

-rw-r----- 1 jaon users      0 2006-06-23 16:08 checklist.txt
-rw-r--r-- 1 jaon users 53279 2006-06-21 13:16 gnome_quick.xml
-rw-rw---- 1 jaon users 0 2006-06-23 16:08 index.htm
-rw-r--r-- 1 jaon users 70733 2006-06-21 09:35 kde-start.xml
drwxr-xr-x 2 tux users 48 2006-06-23 16:09 local

In the above example, user jaon is the owner of file kde-start.xml and has read, write access to the file but can’t execute it. The users group can read the file and can read this file but can’t write and execute it and the same permissions applied for other users in the next block.

How to modify access permissions for your files?
  • If you want to allow the users group write access to kde-start.xml then use following command:
      chmod g+w kde-start.xml
  • To allow the users group and other users write access to kde-start.xml use following command:
     chmod go+w kde-start.xml
  • To remove write access for all users use this command as follows:
     chmod -w kde-start.xml
  • If you don’t want to allow usersgroup and others to change into the local directory, use following command.
     chmod go-x local
  • To allow write access to other users to two files at same time, use following command:
      chmod o+w  kde_quick.xml gnome_quick.xml

Let’s see the commands used to change ownership of files and directories.

The Root user can change ownership for other user’s data. Login to the server using the root user and its password and run the below command to change the ownership.

chown kristy kde_quick.xml

In above example, we have changed ownership for file kde_quick.xml from user jaon to kristy.

To check if the ownership changed or not, lets list the file using ls -l

ls -l kde_quick.xml
-rw-r--r-- 1 kristy users 47896 2006-06-21 09:46 kde_quick.xml

It is done!