Shell Script 50 interview Questions | Part 1

1. What is Shell?
2. What is Shell Scripting?
3. What is the importance of writing Shell Scripts?
4. List some of the common and most widely used UNIX commands.
5. Shell programs are stored in which file?
6. What are the different types of Shells available ?
7. What are the advantages of C Shell over Bourne Shel?
8. In a typical UNIX environment how many kernels and shells are available?
9. Is separate compiler required for executing a shell program?
10.how many shell scripts come with UNIX operating system?
11.When should shell programming/scripting not be used?
12.Basis of shell program relies on what fact?
13.What are the default permissions of a file when it is created?
14.What can be used to modify file permissions?
15.How to accomplish any task via shell script?
16.What are Shell Variables?
17.What are the two types of Shell Variables? Explain in brief?
18.How are shell variables stored? Explain with a simple example?
19.What is the lifespan of a variable inside a shell script?
20.How to make variables as unchangeable?
21.How variables can be wiped out?
22.What are the different blocks of a file system? Explain in brief?
23.What are the three different security provisions provided by UNIX for a file or data?
24.What are the three editors available in almost all the versions of UNIX? 25.What are the three modes of operation of vi editor? Explain in brief?26.What is the alternative command available to echo and what does it do? 27.How to find out the number of arguments passed to the script?
28.What are control instructions and how many types of control instructions are available in a shell? Explain in brief?
29.What are Loops and explain three different methods of loops in brief? 30.What is IFS?
31.What is a Break statement and what is it used for?
32.What is Continue statement and what is it used for?
33.What are Metacharacters in a shell? Explain with some examples?
34.How to execute multiple scripts? Explain with an example?
35.Which command needs to be used to know how long the system has? been running?
36.How to find the current shell which you are using?
37.How to find all the available shells in your system?
38.How to read keyboard inputs in shell scripts?
39.What command needs to be used to take the backup?
40.What are the different commands available to check the disk usage? 41.What are the different communication commands available in Unix/Shell? 42.How to find out the total disk space used by a specific user, say for example username is John?
43.What is Shebang in a shell script?
44.What is the command to be used to display the shell’s environment variables?
45.How to debug the problems encountered in shell script/program?
46.How to know the variable length?
47.What is the difference between = and ==?
48.How to open a read-only file in Unix/shell?
49.How can the contents of a file inside jar be read without extracting in a shell script?