This is the second article of our new series of UNIX articles. This section introduces you to the ways to interact with the Unix operating system. It looks at the Unix Boot Process, shows you the best way to log in to the remote systems and to appropriately shutdown the system. It also covers the **man** command, which is Unix’s built-in help facility.

Unix System Startup

What happens from the Power-On until your operating system is completely loaded is known as the Boot Process. In the simplest terms, the Boot Process comprises the Read-Only Memory’s (ROM or firmware) loading of the program for booting the system. This initial process recognizes the devices on the system that can be booted. The system can boot or start from just a single device at once, but many devices can be recognized as bootable devices if it is booted, one of those other recognized devices can be used in the booting process if the main bootable device fails.

The boot device does not need to be a hard drive, because the system can boot from removable storage devices (for example, a CD-ROM or Pendrive). A boot device just holds the data about where to load the operating system. This booting phase only recognizes the hardware available for booting and whether it is usable.

Control is then transferred to the Kernel. The operating system has not been loaded now and the system is not usable. Some operating systems show the boot process messages on the screen and others hide the system messages from the users by using graphical UI (User Interface) to present the boot process.

After the initial boot process, the boot program starts loading the Unix Kernel, which commonly resides in the root partition of the operating system. The Kernel’s tasks, which differ according to the hardware and Unix version, are followed by the boot process, where the system processes and scripts are started.

The **init** process is the first task which starts. It must be running for the system to run. The **init** process calls the initialization scripts and takes care of administrative tasks related to the system.

The **init** process looks into the initialization script files, mostly called etc/inittab or etc/rcS.d/ or etc/init.d/, it changes according to the OS. This file recognizes how **init** should take care of different run levels and what script files and processes should be started at each run level. A run level (eg rc0.d, rc1.d, and so on ) is a collection of processes or daemons (processes that run all the time in the background).

Unix Normal Login

Logging in implies that you are authenticating yourself to the Unix system as an authenticated user who needs to use system resources. At the point when you try to log in to a Unix system, you are commonly asked to authenticate yourself by typing a username and secret password, in spite of the fact that login methods can include  advanced mechanisms for example, biometrics (a retina eye scan) or one-time-password tokens that change password combinations every few seconds. You can login by using either a graphical UI (GUI) or the command line. See example below of GUI Normal Login.

There are examples where Unix systems are not running graphical UIs and all work is finished using the command line. In these cases, you observe either a flag message showing the type of machine you are logging in to or a message set up by the system administrator. Sometimes you won’t see anything other than the login window.

Unix Remote Login 

To use remote logins, the local and remote systems must have network connectivity to one another and allow access to the accounts via the communication channel (that is, no firewall or system control). Most Unix systems have support for the protocols required to connect with external network systems. SSH (Secure SHell) and TELNET are two most popular services which are used to log in to a remote machine or network system and run commands.

To use these services, you need to use the following command in the Unix terminal :

**command hostname**

the command shows the service you need to use (ideally ssh or telnet, ssh should be used because it uses encryption by default and telnet does not use encryption by default) to connect, hostname shows the name or IP of the remote machine (for example, etechwall or 192.168.1.55) .

Remote Login Using SSH

To connect with system named etechwall with IP 192.168.1.55 from a Linux system with ssh, you could type:

**ssh etechwall or ssh 192.168.1.58**

If this is the first time when you are using ssh to connect with the remote system, you are prompted to accept the remote system’s keys or identification proof (this happens just the first time when you connect with the system). You can confirm the key with the remote system. If someone or any attacker changes the system or tries to be the server using ssh (and attempting to take your user credentials), you will be prompted with a warning.

After entering the secret password for the user account, you enter into a CLI on the remote system and you see that you are truly remotely logged in to the machine.

At the point when you run ssh hostname, ssh expects that you need to log in to the remote with the same username that you are using on the local system. Your username on various systems may not generally be the same as a result of varying naming conventions, so your system name might be biplab on one system, biplab2 on another and biplab3 on a third system. If you need an alternate username to sign in to a remote system, use the following structure:

**ssh username@hostname**

Example : if you are signed into system as user biplab and need to remotely sign in to a system 192.168.1.65 (linux) as client biplab2, you type:

**ssh biplab2@192.168.1.65**  (hostname can be a real name or an IP address)

Remote Login Using TELNET

ssh gives you encryption from local system to the remote system and vice versa, providing more security during the ssh session, yet ssh may not generally be accessible to you due to system limitations or admin policies. If that is the situation, you need to use telnet, which offers a similar usefulness however with no encryption of data being transmitted between the local and remote systems. Telnet is a more established protocol that is in wide use even in the present security condition since it’s accessible on many significant platforms (like Microsoft Windows and DOS) by default. You use telnet much like ssh. To telnet from the biplab machine to the biplab2 machine (192.168.1.60), you would type:

**telnet biplab2 or telnet 192.168.1.60**

Unix System Shutdown

Unix is a multiuser, multitasking system, so there are normally numerous processes or programs running at all times. Since the file system should be synchronized, simply turning the power off button creates the issues with the file system and affects the stability of the unix machine. There are always processes or programs running on the system, regardless of whether no user is logged in and an inappropriate shutdown can cause various issues.

You normally should be the superuser or root (the most privileged user account on a Unix machine) to shutdown the system, however on some Unix machines, an admin user and normal guest users can do as such. A few GUIs functionalitites provide you the option to shutdown your machine by clicking a button.

Another approach to shutdown and restart the unix machine is to use the following command :

**shutdown – r ** (Reboot the machine)

To shut down the unix machine, you can use the following order:

**shutdown – h ** (Power-off the machine)

After typing the above commands, press the enter.

Using the shutdown command is the most appropriate approach to bring the unix machine down without corrupting information or creating system irregularities.

Unix Help with Manual Pages

Unix commands have a huge number of arguments or choices to allow various kinds of functionality with the same command. Since nobody can remember each Unix command and every one of its alternatives, there has been online assistance accessible since Unix’s earliest days. Unix’s version of help documents are called Manual Pages. Man (manual) pages present online documentation in a standard format that is readable by any user. The command is used by just simply the following grammar syntax:

**man command**

When you press enter after typing the above format of command, it will show you something like this.

Final Words

In this chapter, we discussed the basic things related to using a Unix machine, from logging in to shutting down the system. Also figured out how to use the online help system as the man pages, which enable you to turn into an independent user as your toolkit of Unix command grows.

More on Related Topics :

1. Understanding the History, Versions, and Main Components of UNIX

2. How to Disable IPv6 Leak on Linux ?

Biplab Das
mobomotion.tech@gmail.com
My name is Biplab Das. I’m a writer, Blogger, Youtuber and full time IT support engineer whose childhood obsession with science fiction never quite faded. A quarter-century later, the technology that I coveted as a kid is woven into the fabric of everyday life. I’ve spent the past years to learn these technologies, I recently published a book on computer science fundamentals. People say smartphones are boring these days, but I think everyone is beginning to take this wonderful technology marvel for granted.

One thought on “Understanding the System Startup and Remote Login in UNIX.”

Leave a Reply

Your email address will not be published. Required fields are marked *