Types of Files
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.
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.
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.
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.
1. Administrator
2. Standard
3. Child
4. Guest
When you boot the Linux operating system, your user directory (from
the above example /home/tom) is the default working directory.
Windows uses different data drives like Unix/Linux uses a tree like a hierarchical
C: D: E to stored files and folders. file system.
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.
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.
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.
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.
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.
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.
When you are finished, you can use exit command to logout from virtual
console.