UNIX Viva Questions Answers Expanded
UNIX Viva Questions Answers Expanded
Answer: ls
Answer: ls -a
Answer: pwd
Answer: rm <file_name>
rm -r <directory_name>
File Handling
mv source_file destination_file
Answer: Gives read, write, and execute to owner, group, and others.
Answer: ls -l
Answer: su - <username>
Process Management
Answer: ps
Answer: top
Answer: df -h
ls -l | grep "test"
Answer: crontab -e
0 5 * * * /home/user/script.sh
Answer: A shell is a command-line interpreter that provides a user interface to the UNIX operating system. It interprets
UNIX Viva Questions and Answers
Answer: The kernel is the core part of the OS that manages hardware and system resources. The shell acts as an
#!/bin/bash
Example:
Example:
read name
Answer: It stores essential information about user accounts such as username, user ID, group ID, home directory, and
default shell.
Answer: Environment variables are used to define the environment in which programs run.
33. What is the difference between hard link and soft link?
Answer: A hard link is a direct reference to the file's inode. A soft link (symbolic link) is a pointer to the file path. Deleting
the original file breaks the soft link, not the hard link.
Answer: The booting process includes BIOS POST, loading the boot loader (like GRUB), initializing the kernel, mounting
the root filesystem, starting the init system, and finally starting user-level services.
0 Halt
1 Single-user mode
6 Reboot