Linux Basic Notes For VLSI
Linux Basic Notes For VLSI
The Linux Operating System is a Unix-like operating system that combines a wide range of open-
source tools and components to form a complete computing environment. These components include file
systems, user interfaces, system utilities, and application programs all working together to manage hardware
and enable users to interact with their computer systems.
To create a full and functional system, the Linux is combined with a collection of software packages
and utilities, which are together called Linux distributions.
What is a “distribution?”
Linux distribution is an operating system that is made up of a collection of software based on Linux
kernel or you can say distribution contains the Linux kernel and supporting libraries and software. And you
can get Linux-based operating system by downloading one of the Linux distributions and these distributions
are available for different types of devices like embedded devices, personal computers, etc.
• For Advanced Users: Arch Linux is favored for its minimalism and deep customization. Gentoo is
another powerful option for users who want full control but are ready for a steep learning curve.
• For Developers: Fedora is popular for its cutting-edge tools and suitability for testing and
development. Debian stands out for its stability and vast package repository, making it great for both
development and production.
• For Lightweight Systems: Lubuntu is frequently picked by users either like lightweight operating
systems or have outdated equipment due to its ability to utilize system resources efficiently while
maintaining functionality. Another slim option is Puppy Linux, that is made to run well on outdated
hardware while maintaining the essential functions and applications.
Installing Linux
Selecting a Ubuntu, Fedora, or Linux Mint distribution which suits your needs is the initial step in the
straightforward procedure for installing Linux.
Installing Linux on bootable USB drive
• Download the ISO file first from the distribution's official website.
• Next, utilize an application like Etcher for macOS and Linux or Rufus for Windows to create a
bootable USB drive.
• Following you insert the USB drive into your computer and restart it.
• After that you may set the USB drive as the primary boot device by traversing to the BIOS or UEFI
settings.
• Upon booting from the USB the hard drive, the Linux setup will show up.
• To partition the drive, choose your time zone, create user accounts, and change system settings.
• When the installation concludes, disconnect the USB drive and turn on your computer normally.
• For more detailed way to install the Linux Mint .
Advantages of Linux
• The main advantage of Linux is it is an open-source operating system you can contribute, modify,
and distribute the code freely.
• In terms of security, Linux is more secure than any other operating system and does not require any
anti-virus software.
• The software updates in Linux are easy and frequent.
• Linux is freely available to use on the internet.
• It provides high stability it rarely slows down or freezes and there is no need to reboot it after a
short time.
Disadvantages of Linux
• It is not very user-friendly. So, it may be confusing for beginners.
• It has small peripheral hardware drivers as compared to windows.
Linux Commands
Basic tools for utilizing the command line interface (CLI) to communicate with the operating system are
Linux commands. Commonly used commands like:
Package management differs depending on the distribution; Fedora-based machines use dnf, while Debian-
based systems use apt. Commands like cat, grep, awk, and sed are required for editing text files. Knowing
and performing these directions well enables. For clear understanding about the Linux commands refer
this link.
Linux History
In 1991, Linus Torvalds created the Linux kernel, inspired by UNIX operating system and the
MINIX operating system, to make a flexible and affordable system for personal computers. Developers
around the world quickly joined in to improve it, leading to the creation of full Linux systems known as
distributions.
Over the years, Linux has become known as a key component of modern computing, powering
everything from servers and personal computers to supercomputers and smartphones. Due to its flexibility,
durability, and strong community support, developers, businesses, and educational institutions frequently opt
for it.
Linux commands are essential for controlling and managing the system through the terminal. This
terminal is similar to the command prompt in Windows. It’s important to note that Linux/Unix commands
are case-sensitive. These commands are used for tasks like file handling, process management, user
administration, networking, and system monitoring. Here’s a list of A to Z Linux commands, covering all
operations that can be performed on the Linux terminal, including complete Linux commands for file
management, process control, networking, user administration, and system monitoring:
Commands Description
access Used to check whether the calling program has access to a specified file. It can
be used to check whether a file exists or not
accton Used to turn on or turn off the process for accounting or change info process
accounting file
acpi Used to display the battery status and other ACPI information
acpi_available Tests whether ACPI (Advanced Configuration and Power Interface) subsystem
is available or not
acpid It provides intelligent power management on a system and is used to notify the
user-space programs about the ACPI events
addr2line Used to convert addresses into file names and line numbers
alias Instructs the shell to replace one string with another string while executing the
commands
apt Provides a high-level CLI (Command Line Interface) for the package
management system and is intended as an interface for the end user which enables
some options better suited for interactive usage by default compared to more
specialized APT tools like apt-cache and apt-get
aptitude Opens up a highly built-in interface to interact with the package manager
of the machine
ar Used to create, modify and extract the files from the archives
arp It manipulates the System’s ARP cache. It also allows a complete dump of
the ARP cache
atd It is a job scheduler daemon that runs jobs scheduled for later execution
atrm Used to remove the specified jobs. To remove a job, its job number is passed
in the command
atq It displays the list of pending jobs which are scheduled by the user
autoheader Used to create a template file of C “#define” or any other template header
for configure to use
automake Used for automatically generating Makefile.in files compliant with the set
GNU Coding Standards
autoreconf Used to create automatically buildable source code for Unix-like systems
autoupdate Used to update configure.in file in our Linux system to a newer Autoconf.
awk It is a scripting language used for manipulating data and generating reports
banner Used to print the ASCII character string in large letter to standard output
basename It strips directory information and suffixes from file names i.e. it prints the
file name NAME with any leading directory components removed
batch Used to read commands from standard input or a specified file and execute
them when system load levels permit i.e. when the load average drops below 1.5
biff A mail notification system for unix that notifies the user at the command
line when new mail arrives and tells from whom it is
break Used to terminate the execution of for loop, while loop and until loop
builtin Used to run a shell builtin, passing it arguments(args), and also to get the
exit status
bzless It does not have to read the entire input file before starting, so with a large
file, it starts up faster
bzmore Used as a filter for CRT viewing of bzip2 compressed files, which are saved
with .bz2 suffix
cal Used to see the calendar of a specific month or a whole year. By default,
it shows current month's calendar as output
case It is the best alternative when we had to use multiple if/elif on a single
variable
cat Reads data from file and gives their content as output. It helps us to
create, view, concatenate files
cc It is used to compile the C language codes and create executables
chage Used to view and change the user password expiry information
chattr It is a file system command which is used for changing the attributes of
a file in a directory
chfn It allows you to change a user’s name and other details easily. chfn
stands for Change finger
chkconfig Used to list all available services and view or update their run level
settings
cksum Used to display a CRC(Cyclic Redundancy Check) value, the byte size
of the file and the name of the file to standard output
cmp Used to compare the two files byte by byte and helps you to find out
whether the two files are identical or not
col It is used to filter out reverse line feeds. The col utility simply reads from
the standard input and writes to standard output
colcrt Used to format the text processor output so that it can be viewed on
Cathode Ray Tube displays
comm Compares two sorted files line by line and write to standard output; the
lines that are common and the lines that are unique
compress Used to reduce the file size. After compression, the file will be available
with an added .Z extension
continue Used to skip the current iteration in for, while and until loop
cpio cpio stands for “copy in, copy out“. It is used for processing the archive
files like *.cpio or *.tar. This command can copy files to and from archives
crontab A list of commands that you want to run on a regular schedule, and also
the name of the command used to manage that list
csplit Used to split any file into many parts as required by the user
ctags It allows quick access across the files (For example quickly seeing
definition of a function)
curl A tool to transfer data to or from a server, using any of the supported
protocols
cut For cutting out the sections from each line of files and writing the result
to standard output
cvs Used to store the history of a file. Whenever a file gets corrupted or
anything goes wrong “cvs” help us to go back to the previous version and restore
our file
date Used to display the system date and time. It is also used to set date and
time of the system
declare Used to declare shell variables and functions, set their attributes and
display their values
df Used to display information related to file systems about total space and
available space
diff Used to display the differences in the files by comparing the files line by
line
dirname Used to remove the trailing forward slahes “/” from the NAME and prints
the remaining portion
dmesg Used to examine the kernel ring buffer and print the message buffer of
kernel
dmidecode Used when the user wants to retrieve system’s hardware related
information such as Processor, RAM(DIMMs), BIOS detail, etc. of Linux system
in a readable format
domainname Used to return the Network Information System (NIS) domain name of
the host
dosfsck Diagnoses MS-DOS file system for problems and attempts to repair them
du Used to track the files and directories which are consuming excessive
amount of space on hard disk drive
dumpe2fs Used to print the super block and blocks group information for the
filesystem present on device
ed Used for launching the ed text editor which is a line-based text editor with
a minimal interface which makes it less complex for working on text files i.e
creating, editing, displaying and manipulating files
egrep It treats the pattern as an extended regular expression and prints out the
lines that match the pattern
emacs It is a editor having simple user interface. Also, there is no insert mode in
this editor. It only have editing mode.
env Used to either print environment variables. It is also used to run a utility
or command in a custom environment
ex It is a text editor in Linux which is also termed as the line editor mode of
the vi editor
exec Used to execute a command from the bash itself
expand Allows you to convert tabs into spaces in a file and when no file is
specified it reads from standard input
expect This command or scripting language works with scripts that expect user
inputs. It automates the task by providing inputs
export It is bash shell BUILTINS commands, which means it is part of the shell.
It marks an environment variables to be exported to child-processes
factor Used to print the prime factors of the given numbers, either given from
command line or read from standard input
fc-cache It scans the font directories and build font cache for applications which
use fontconfig for their font handling
fc-list It is used to list the available fonts and font styles. Using the format
option, the list of all fonts can be filtered and sorted out
fdisk Format disk is a dialog-driven command in Linux used for creating and
manipulating disk partition table
file Used to determine the type of a file. .file type may be of human-
readable(e.g. ‘ASCII text’) or MIME type(e.g. ‘text/plain; charset=us-ascii’)
find Used to find files and directories and perform subsequent operations on
them
finger It is a user information lookup command which gives details of all the
users logged in.
for Used to repeatedly execute a set of command for every element present
in the list
free Displays the total amount of free space available along with the amount
of memory used and swap memory in the system, and also the buffers used by the
kernel
g++ Used for preprocessing, compilation, assembly and linking of source code
to generate an executable file
gdb GNU Debugger tool helps to debug the programs written in C, C++, Ada,
Fortran, etc.
getent Used to get the entries in a number of important text files called databases
grep Searches a file for a particular pattern of characters, and displays all lines
that contain that pattern
groups Groups are the collection of users. Groups make it easy to manage users
with the same security and access privileges
grpck It verifies the integrity of the groups information. It checks that all entries
in /etc/group and /etc/gshadow have the proper format and contain valid data
grpconv It is used to convert to shadow groups. The grpconv command creates a
gshadow from the group and an optionally existing gshadow
gzip This command compresses files. Each single file is compressed into a
single file.
halt Used to instruct the hardware to stop all the CPU functions. Basically, it
reboots or stops the system.
hdparm Used to get statistics about the hard disk, alter writing intervals, acoustic
management, and DMA settings
hexdump Used to filter and display the specified files, or standard input in a human
readable specified format
hostname Used to obtain the DNS(Domain Name System) name and set the system’s
hostname or NIS(Network Information System) domain name.
hostnamectl Provides a proper API used to control Linux system hostname and change
its related settings
htop It is a command line utility that allows the user to interactively monitor the
system’s vital resources or server’s processes in real time
hwclock Utility for accessing the hardware clock, also called Real Time Clock
(RTC)
iconv Used to convert some text in one encoding into another encoding
id Used to find out user and group names and numeric ID’s (UID or group
ID) of the current user or any other user in the server
ifup It basically brings the network interface up, allowing it to transmit and
receive data
import Used for capturing a screenshot for any of the active pages we have and
it gives the output as an image file
info Reads documentation in the info format. It will give detailed information
for a command when compared with the main page
iostat Used for monitoring system input/output statistics for devices and
partitions
iotop Used to display and monitor the disk IO usage details and even gets a
table of existing IO utilization by the process
iptables Used to set up and maintain tables for the Netfilter firewall for IPv4,
included in the Linux kernel
iptables- It will save the current iptables rules in a user specified file, that can be
save used later when the user wants
iwconfig Used to display the parameters, and the wireless statistics which are
extracted from /proc/net/wireless
join It is a command line utility for joining lines of two files based on a key
field present in both the files
kill Used to terminate processes manually. kill command sends a signal to a process
which terminates the process
last Used to display the list of all the users logged in and out since the file
/var/log/wtmp was created
less Used to read contents of text file one page(one screen) per time
lsblk Used to display details about block devices and these block devices(Except ram
disk) are basically those files that represent devices connected to the pc.
lsmod Used to display the status of modules in the Linux kernel. It results in a list of
loaded modules
lsusb Used to display the information about USB buses and the devices connected to
them
mailq This command in Linux prints the mail queue i.e the list of messages that are
there in the mail queue
man Used to display the user manual of any command that we can run on the
terminal
mkdir Allows the user to create directories. This command can create multiple
directories at once
more Used to view the text files in the command prompt, displaying one screen at
a time in case the file is large (For example log files)
mount Used to mount the filesystem found on a device to big tree structure(Linux
filesystem) rooted at ‘/‘
mv Used to move one or more files or directories from one place to another in
file system like UNIX
nmcli Used for controlling NetworkManager. nmcli command can also be used to
display network device status, create, edit, activate/deactivate, and delete network
connections
nslookup It is a network administration tool for querying the Domain Name System
(DNS) to obtain domain name or IP address mapping or any other specific DNS
record
od Used to convert the content of input in different formats with octal format
as the default format
pidof Used to find out the process IDs of a specific running program
ping Used to check the network connectivity between host and server/host
pinky It is a user information lookup command which gives details of all the users
logged in. Unlike finger, in the pinky, you may trim the information of your interest.
pmap Used to display the memory map of a process. A memory map indicates how
memory is spread out
poweroff Sends an ACPI signal which instructs the system to power down
printf Used to display the given string, number or any other format specifier on the
terminal window
ps Used to list the currently running processes and their PIDs along with some
other information depends on different options
pwd It prints the path of the working directory, starting from the root
read Reads up the total number of bytes from the specified file descriptor into the
buffer
rename Used to rename the named files according to the regular expression perlexpr
reset Used to initialize the terminal. This is useful once a program dies leaving a
terminal in an abnormal state
restore Used for restoring files from a backup created using dump
route Used when you want to work with the IP/kernel routing table
rsync It is a software utility for Unix-Like systems that efficiently sync files and
directories between two hosts or machines
sar Used to monitor Linux system’s resources like CPU usage, Memory
utilization, I/O devices consumption, etc.
screen Provides the ability to launch and use multiple shell sessions from a
single ssh session
scriptreplay Used to replay a typescript/terminal_activity stored in the log file that was
recorded by the script command
sdiff Used to compare two files and then writes the results to standard output in
a side-by-side format
sed Used for finding, filtering, text substitution, replacement and text
manipulations like insertion, deletion search etc.
select Used to create a numbered menu from which a user can select an option
showkey prints to standard output either the scan codes or the key code or the
`ascii’ code of each key pressed
shred Used in order to delete a file completely from hard disk
sleep Used to create a dummy job. A dummy job helps in delaying the
execution
sudo Used as a prefix of some command that only superuser are allowed to run
systemctl Used to examine and control the state of “systemd” system and
service manager
tee Reads the standard input and writes it to both the standard output and one
or more files
time Used to execute a command and prints a summary of real-time, user CPU
time and system CPU time spent by executing a command when it terminates
traceroute Prints the route that a packet takes to reach the host
tty It displays the information related to terminal. It basically prints the file
name of the terminal connected to standard input
unexpand Converts each spaces into tabs writing the produced output to the standard
output
uniq It is a command line utility that reports or filters out the repeated lines in a
file
until Used to execute a set of commands as long as the final command in the
‘until’ Commands has an exit status which is not zero
Uptime Used to find out how long the system is active (running)
usermod Used to change the properties of a user in Linux through the command line
users Used to show the user names of users currently logged in to the current host
vi It is the default editor that comes with the UNIX operating system is called
visual editor.
wall Displays a message, or the contents of a file, or otherwise its standard input,
on the terminals of all currently logged in users
wc Used to find out number of lines, word count, byte and characters count in
the files specified in the file arguments
Wget Used to download files from the server even when the user has not logged
on to the system and it can work in background without hindering the current
process
which Used to locate the executable file associated with the given command by
searching it in the path environment variable
whoami Displays the username of the current user when this command is invoked
write Allows a user to communicate with other users, by copying lines from one
user’s terminal to others
xargs Used to build and execute commands from standard input. It converts input
received from standard input into arguments of a command
zdiff Used to invoke the diff program on files compressed via gzip
zdump Used to print the current time in the specified zone or you can say prints the
current time in each zonename named on the command line
zgrep Used to search out expressions from a given a file even if it is compressed
zip It is a compression and file packaging utility for Unix. Each file is stored in
single .zip {.zip-filename} file with the extension .zip