0% found this document useful (0 votes)
50 views10 pages

Types of Files

Linux systems provide virtual consoles that emulate physical terminals, allowing multiple users to access the system simultaneously through separate login sessions. Virtual consoles are software applications that simulate physical terminals by providing a text-based shell environment. Linux typically provides 6 virtual consoles by default that operate independently and can be switched between using keyboard shortcuts. This terminal concept originates from mainframe computing where physical terminals were used to access computing resources from a single system.

Uploaded by

Debashish Roy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views10 pages

Types of Files

Linux systems provide virtual consoles that emulate physical terminals, allowing multiple users to access the system simultaneously through separate login sessions. Virtual consoles are software applications that simulate physical terminals by providing a text-based shell environment. Linux typically provides 6 virtual consoles by default that operate independently and can be switched between using keyboard shortcuts. This terminal concept originates from mainframe computing where physical terminals were used to access computing resources from a single system.

Uploaded by

Debashish Roy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

Types of Files

In Linux and UNIX, everything is a file. Directories are files, files are
files, and devices like Printer, mouse, keyboard etc.are files.

Let's look into the File types in more detail.

General Files
General Files also called as Ordinary files. They can contain image,
video, program or simply text. They can be in ASCII or a Binary
format. These are the most commonly used files by Linux Users.

Directory Files
These files are a warehouse for other file types. You can have a
directory file within a directory (sub-directory).You can take them as
'Folders' found in Windows operating system.

Device Files:
In MS Windows, devices like Printers, CD-ROM, and hard drives are
represented as drive letters like G: H:. In Linux, there are represented
as files.For example, if the first SATA hard drive had three primary
partitions, they would be named and numbered as /dev/sda1,
/dev/sda2 and /dev/sda3.

Note: All device files reside in the directory /dev/

All the above file types (including devices) have permissions, which
allow a user to read, edit or execute (run) them. This is a powerful
Linux/Unix feature. Access restrictions can be applied for different
kinds of users, by changing permissions.

Windows Vs. Linux: Users


There are 3 types of users in Linux.

1. Regular
2. Administrative(root)
3. Service
Regular User

A regular user account is created for you when you install Ubuntu on
your system. All your files and folders are stored in /home/ which is
your home directory. As a regular user, you do not have access to
directories of other users.

Root User
Other than your regular account another user account called root is
created at the time of installation. The root account is
a superuser who can access restricted files, install software and has
administrative privileges. Whenever you want to install software,
make changes to system files or perform any administrative task on
Linux; you need to log in as a root user. Otherwise, for general tasks
like playing music and browsing the internet, you can use your
regular account.

Service user
Linux is widely used as a Server Operating System. Services such as
Apache, Squid, email, etc. have their own individual service
accounts.  Having service accounts increases the security of your
computer. Linux can allow or deny access to various resources
depending on the service.

In Windows, there are 4 types of user account types.

1. Administrator
2. Standard
3. Child
4. Guest

Windows Vs. Linux: HOME Directory


For every user in Linux, a directory is created as /home/
Consider, a regular user account "Tom". He can store his personal
files and directories in the directory "/home/tom". He can't save files
outside his user directory and does not have access to directories of
other users. For instance, he cannot access directory "/home/jerry" of
another user account"Jerry".

The concept is similar to C:\Documents and Settings in Windows.

When you boot the Linux operating system, your user directory (from
the above example /home/tom) is the default working directory. 

Windows Vs. Linux:


Windows Linux

Windows uses different data drives like Unix/Linux uses a tree like a hierarchical
C: D: E to stored files and folders. file system.

Windows has different drives like C: D: E There are no drives in Linux

Hard drives, CD-ROMs, printers are Peripherals like hard drives, CD-ROMs,
considered as devices printers are also considered files in
Linux/Unix

There are 4 types of user account types There are 3 types of user account types
1) Administrator, 2) Standard, 3) Child, 1) Regular, 2) Root and 3) Service
4) Guest Account

Administrator user has all administrative Root user is the super user and has all
privileges of computers. administrative privileges.

In Windows, you cannot have 2 files with Linux file naming convention is case
the same name in the same folder sensitive. Thus, sample and SAMPLE
are 2 different files in Linux/Unix
operating system.

In windows, My Documents is default For every user /home/username


home directory. directory is created which is called his
home directory.
Few linux distributions:
Redhat,Fedora,Ubuntu,Suse,DebianCaldera

How was Linux created?

Linux was created in 1991 by Linus Torvalds, a then-student at the


University of Helsinki. Torvalds built Linux as a free and open source
alternative to Minix, another Unix clone that was predominantly used
in academic settings. He originally intended to name it “Freax,” but
the administrator of the server Torvalds used to distribute the original
code named his directory “Linux” after a combination of Torvalds’ first
name and the word Unix, and the name stuck.

What is the difference between Unix and Linux?

You may have heard of Unix, which is an operating system


developed in the 1970s at Bell Labs by Ken Thompson, Dennis
Ritchie, and others. Unix and Linux are similar in many ways, and in
fact, Linux was originally created to be indistinguishable from Unix.
Both have similar tools for interfacing with the system, programming
tools, filesystem layouts, and other key components. However, not all
Unices are free and open source.

Over the years, a number of different operating systems have been


created that attempted to be “unix-like” or “unix-compatible,” but
Linux has been the most successful, far surpassing its predecessors
in popularity.

Who “owns” Linux?

By virtue of its open source licensing, Linux is freely available to


anyone. However, the trademark on the name “Linux” rests with its
creator, Linus Torvalds. The source code for Linux is under copyright
by its many individual authors, and licensed under the GPLv2
license.

The term “Linux” technically refers to just the Linux kernel. Most
people refer to the entire operating system as "Linux" because to
most users an OS includes a bundle of programs, tools, and services
(like a desktop, clock, an application menu, and so on). Some
people, particularly members of the Free Software Foundation, refer
to this collection as GNU/Linux, because many vital tools included
are GNU components. However, not all Linux installations use GNU
components as a part of the operating system: Android, for example,
uses a Linux kernel but relies very little on GNU tools.

Linux Virtual Console and Terminal


Explained
This tutorial explains what Linux virtual consoles and terminals are and how
they work in Linux with examples. Virtual consoles and terminals allow
multiple users to login and access a Linux system simultaneously.

Linux Virtual Console (Terminal)

To understand the Linux virtual console concept, we have to look back in the
history of computers. In earlier days, computers used to be very expensive.
Instead of personal computers, companies used to prefer mainframe
computers. A mainframe computer allows multiple users to connect with it
separately. In mainframe computing, every user accesses the mainframe
computer as a separate computer.
A device known as terminal which contains only few parts and a monitor with
integrated keyboard is used to access the mainframe computer. The earliest
terminals were also known as teletypes (abbreviated TTY).
Terminal connects with mainframe computer on serial console port. Once
connected, it uses all resources such as CPU, RAM and Hard disk from
mainframe computer.

Since a terminal directly communicates with system at low level on dedicated


serial console port, it does not need any special service, software or
application to run. When you booted up the terminal, you would see a login
prompt called Linux console on monitor.

In terminal, Linux console is the only place where you can enter commands for
system. Linux operating system installed in mainframe computer emulates
each console as a separate system with a separate login session.

Over the time, technology improved and the price of personal computers
came down which made companies to switch on personal computers from
mainframe computers. Personal computers not only have all necessary
resources for operating system but also easier to setup and manage.

Since PCs have all necessary resource for operating system, instead of
connecting those with mainframe computer companies preferred to install an
individual operating system in each PC. Gradually terminals became outdated
and replaced by PCs.

Even though terminals are history now, terminal concept still exists in Linux
operating system. A Linux operating system not only have necessary software
configuration that allows physical terminals to connect with it but also offers a
way to access that software configuration virtually. That way is known as
virtual console.
Physical console: - A physical terminal device connected with Linux system on
serial port via serial cable physically.

Virtual console: - An application that simulates a physical terminal device in


software and connects it with Linux system on serial port through software
configuration virtually.

Physical terminal device: - A physical device that consisted of nothing more


than a monitor and keyboard attached to it. It uses all resources such as CPU,
RAM and Hard disk from server system.

Virtual terminal application: - An application that provides a text based


environment to access the shell. Since physical terminals are no longer used, it
became common practice to use the word terminal to refer the virtual
terminal application.

Number of virtual consoles

Different Linux flavors offer different number of virtual consoles. For instance,
RHEL provides six virtual consoles while Ubuntu provides seven virtual
consoles. Virtual consoles are always mentioned along with one physical
console (also known as default console). So, the actual number of virtual
consoles remains one less than the total number of consoles. For example, in
RHEL and Ubuntu the number of actual virtual consoles are 5 (six - one) and 6
(seven - one) respectively.

Default working environment in virtual console


Linux provides two types of working environment; GUI (Graphic User Interface)
and CLI (Command Line Interface). GUI contains the Desktop environment and
allows user to access several sub-shells simultaneously. CLI contains only
command line interface and allows user to access a single shell at a time.

Linux allows us to select or skip GUI environment during the installation. If it is


selected, GUI is installed in physical console and CLI is installed in virtual
consoles. If it is skipped, CLI is installed in both physical and virtual consoles.

Whether you install GUI or not, in virtual consoles always CLI environment is
installed. As they simulate the physical terminals which were designed only to
access the CLI environment.

Just like the total number of consoles, sequence of physical console and
virtual console is also Linux flavor specific. For example, in RHEL GUI is
available as the first console while in Ubuntu it is available as the last console.

Difference between virtual console and terminal

Virtual console uses a single terminal to provide workspace and command


prompt. Since a virtual console offers only CLI interface and usages a single
terminal to access that CLI interface, the words virtual console and terminal are
sometime interchanged. But both words have different meaning.

The word virtual console refers to an application that simulates a physical


terminal while the word terminal refers to an application that allows us to
access and use the shell.

How to access virtual console


Virtual consoles can be accessed by holding the Ctrl and Alt keys and
pressing a function key between F1 and F6. Let’s take an example.

Hold down the Ctrl + Alt keys, and press F4 to access a virtual console. In


virtual console, login from user root and run who command.
The who command lists the currently logged in users along with the console
number where they are logged in.

When you are finished, you can use exit command to logout from virtual
console.

Switching between virtual consoles

You can cycle through virtual consoles using the Crtl+Alt+F1 to F7 keys.


Switching does not terminate the active login session. Each virtual console is
independent and separate.

To switch between virtual consoles or to return back in GUI from virtual


console, you may use only Alt+F(1,2,3,4,5,6) keys. While switching between
virtual consoles or accessing GUI from virtual console, Ctrl key is optional. It is
required only when accessing virtual console from GUI.

You might also like