syai24, 12201 PM {50 Most Useful Linux Commands for VLSI Engineers -Team VLSI
Menu Q
50 Most Useful Linux Commands for
VLSI Engineers
November 21, 2020 by Team VLSI
Linux is an open-source operating system which is the first choice of every technocrat. For VLSI
Design Engineers also most of the EDA tools are only compatible with Linux. In Linux, we
interact with OS majorly with Command-Line Interface (CLI). In beginning, it might look a bit
tedious as you have to remember lots of commands and we are addicted to GUI interface but
later you will definitely love it.
In this article, we will learn some of basic Linux commands with examples. I would request to
my reader don't just read this article but, practice these commands parallelly for best
understanding and clarity. If you wish you can also make a small cheat sheet for your use. In this
article, we will learn 4 categories of 50 most useful basic commands. For advance level
commands we are going to publish another article later.
Category-1: File System Management
1. 1s
: list files and directories
https: /Reamis.com/2020/11150-most-usefubnux-commands-fr-visi-engineers hm! a2ize, 1201 PM {5 Most Useful Linux Commands fr VSI Engineers Team VLSI
Use:
Is-1_; indicates file/directory type, permissions, owner, size, last modified
—normal, d- directory, s-socket file, Link file
Is -a ; shows hidden files/directories
Is-t_; lists the files/directory on basis of modification time
Is-lart_; lists all the files and directories in order of last modified.
clear
ar the terminal (but keep the history of commands intact)
3. man /—help
: Show a manual of command and switches written in details.
4. pwd
: Print Working Directory, The directory where you are currently.
5. ed
: Change Directory, to move to another directory.
Use:
cd .. ; back to parent directory
cd — ; back to previous directory
ed ~ ; go to home directory
ed../.././ ; back to n steps
ed ‘abe xyz’ ; go to a directory whose name contain white space
6. mkdir
: create a directory
Use:
mkdir directory_name ; To create a new directory with the given name.
mkdir dirt dir2 dirg ; To create multiple directories in a single step.
7. touch
create a file
https: /Reamis.com/2020/11150-mest-usefubnux-commands-for-visi-engineers hm! 2122syai24, 12201 PM {50 Most Useful Linux Commands for VLSI Engineers -Team VLSI
Use:
touch file_name ; create a new file
touch filet file2 fileg ; To create multiple files
touch -a file_name ; to change file access time
touch -m file_name ; to change the file modification time
8. gedit file_name &
: ereate and edit a file in GUI mode
Use:
gedit /path/to/file_name ; create and edit a file in specified location
; word count, line no. , language
9. vifile_name
: create and edit a file using command-line interface
Use:
i ; Switch to edit mode
ESc_ ; Exit from edit mode and Switch to command mode
/string ; find the string
Ese + :q ;exit without saving
Ese +:s_; Save only not exit
Ese + :wq ; save and exit
10. ep source destination
: copy command
Use:
ep souree_file destination_dir _; To copya file
epsource_file. ; To copy a file to current directory (“.” means current dir)
cp fsource_file destination_dir ; To copy forcefully a regular file
cp -R source_file destination_dir ; To coppy recursive a directory
11. my source destination
: move command, like cut+paste
Use:
mvfif2 _; rename fi by f2
mv -rf; recursive and force moving of a directory
‘ips Reals comy202011150 text2 ; redirection of text, overwrite
cat textt >> text2 ; appending the text
14. whieh,
: Path of the command
Use:
which virtuoso ; Display the path of the executable file for virtuoso
which vi ; Will show the vi command path
which python ; Will show the installation path of the python program
15. find
: searching a file/directory
Use:
find / -name “dir_name’” ; to find a file/dir
find /home/user_name -name “file_name” ; to find a file/dir only in user's home area
man find ; to get more details on find command
16. history
: Get the list of executed commands
https: /Reamis.com/2020/11150-mest-usefubnux-commands-for-visi-engineers hm! a2suu26, 1201 Pm {5 Most Useful Linux Commands fr VSI Engineers Team VLSI
Use:
history ; the history of all command
history n_ list of last n command executed
In ; repeat any command in the history i
export HISTTIMEFORMAT="%F %T’; setting history command with timestamp format
unset export HISTTIMEFORMAT ; unsetting the time format.
history -c ; clear all the history
~/-bash_history ; location of stored command history
17. chmod
: Change mode, change the permis
ion of file/directory
Use:
Is-1 filename _; To see the current permissions of the file/dir
Let's understand the permissions through this ecample.
file
1: file or directory (- or d)
2. Permission for owner d :directory
3. Permissin for Group
4, Permissions for Others read
5. Ower w write
es 6. Group x Fexecute/search
rwWwx7 7°77 5 4
4 2 1TWX TWxTWxIWx PX oT
Numeric and Symbolic permissions
chmod 777 filename _ ; set all the permis
chmod 754 filename __; set rwx for owner, r-x for the group and r- for others
chmod -R 777 dir_name_; Set all permission recursively inside the dir
ion for all users
titps:hearvsi.com/2020/11/50-most-usefulinux-commande-forslsi-engineers.html 5122syai24, 12201 PM {50 Most Useful Linux Commands for VLSI Engineers -Team VLSI
Category-2: Text processing commands
18. touch
: create a new file
Use:
touch filer ; create an empty file
touch filer file2 fileg ; create multiple files in one command
touch ~am file2 ; change access and modification time
19. gedit
: AGUI based Linux text editor
Use:
gedit & ; open gedit text editor and release the CLI
gedit filer ; create/open a file in geditor
20. head
: To read the first 10 lines of a file in CLI
Use:
head file_name_ ; To read the first 10 lines of a file
head -n 8 file_name_ ; To read first 8 lines of a file OR head -8 file
head-4*log _; Read first 4 lines of all log files in PWD
21. tail
:'To read the last 10 lines in the command line
Use:
tail file_name_; To read last 10 lines of a file
tail -n 12 filename ; To read last 12 lines of a file OR tail -2 file
22. sort
: To sort the list
Use:
sort file_name ; sort the content of file
https: /Reamis.com/2020/11150-mest-usefubnux-commands-for-visi-engineers hm!syai24, 12201 PM
sort —n file_name ; sorting a file which has numbers
sort -rfile_name _; sorting the file in reverse order
sort -o outputfile inputfile ; redirection of sorted output
sort =n -k2 file_name ; sorting the file on basis of the nth column
23. unique
: An utility for filtering the repeated lines in a file
Use:
unique file_name_; will display only unique lines
unique -c file_name _; will tell no. of times a line has repeated
24. more
: Display text one screen at a time
Use:
more file_name ; display the text in command line
next screen,
back to previous screen,
next line
more -10 file_name ; will display 10 lines at a time
dmesg | more ; more with pipe.
25. less
: to read the text file in the command line
Use:
less file_name ; To view the content of a file
‘50 Most Useful Linux Commands for VLSI Engineers - Team VLSI
similar to more command with some advance features
less -N file_name ; Will show the content with line number
or Down Arrow: To move next line
Up Arrow: to move up a line
: To move down one page
: To move up one page
https: /Reamis.com/2020/11150-mest-usefubnux-commands-for-visi-engineers hm!syai24, 12201 PM {50 Most Useful Linux Commands for VLSI Engineers -Team VLSI
26. grep
: global regular expression print
Use:
grep i words file_name ; display the line contains searched word
dmesg | grep sda_; filtered the output and show only line having sda
dmesg | grep sda ~A 5 ; Display 5 lines after the matching word sda
27. diff or vimdiff
: find the difference between two files/dir
Use:
diff file1 file2 ; To check the difference between two files
diff dirt dir2 ; To check the difference between contains of two dir
Asimilar GUI tool is “meld”
vimdiff fi f2 , gvimdiff fi f2
28. we
: word count of a file
Use:
we file_name ; Newline, word and byte count in the file
we-I file_name ; To count total new lines in the file
‘we -w file_name ; T count total words only
we -c file_name ; T count total characters only
Category-3: Process management commands
29, top or htop
: It will show the status of various resources and tasks
Use:
top ; you can see the utilization statics for resoure
htop ; Similar to the top command but an improved version.
and get PID of all running process
https: /Reamis.com/2020/11150-mest-usefubnux-commands-for-visi-engineers hm! azzsyai24, 12201 PM {50 Most Useful Linux Commands for VLSI Engineers -Team VLSI
30. ps
: Known as Process Status
Use:
ps rocess for the current shell
ps-e _; Display all active process
ps-ef —_; Display all active process in full format
ps -ef | grep virtuoso; If the list is too big we can grep it to a specific command
31. kill
: To terminate a process
Use:
kill PID _; Killing a process by PID, PID is a numeric value.
kill PID1 PID2 PID3 _; Kill multiple processes together. You can specify the signal name in
between Kill and PID. If no signal has been specified, by default TERM signal will be sent.
32. who
: Display the users who are currently logged in your Linux machine
Use:
who; Without any argument who command will display user’s login name, terminal, login
time and host
who -q_ ;Display the name of all users and total no. of users logged in
33. W
information about current logged user and what they are doing,
34. users
: Display the all current users name in a single line
35. last
1 it display the list of user who logged the system
Use:
last ; If no options provided the last command displays a list of all users logged in (and out)
since /var/log/wtmp file was created
last user_name _ ;Will display the activities of a particular user only
36. free
: Used to check available physical memory and swap memory
ips Reals comy202011160 Synthesis and Physical Design Interview Questions: Question Set -5.
3 thoughts on “50 Most Useful Linux Commands for
VLSI Engineers”
https: /Reamis.com/2020/11150-mest-usefubnux-commands-for-visi-engineers hm! rane