sap basis; interview
[recent]

Excel

[excel][bleft]

Database

[database][bsummary]

SAP BASIS

[basis][twocolumns]

Linux Interview Questions Answers 200 PART 1

Linux Interview Questions Answers 200 PART 1

 

Linux Interview Questions Answers 200 PART 1 | Linux powers servers, cloud platforms, DevOps pipelines, and cybersecurity operations. If you’re aiming for a role as a SysAdmin, DevOps engineer, or security analyst, strong Linux skills can set you apart. 🚀


1. What is Linux?

Answer: Linux is an open-source, Unix-like operating system kernel developed by Linus Torvalds.

It is widely used in servers, desktops, mobile devices, and embedded systems.


2. What is the difference between Linux and Unix?

Answer: Linux is an open-source Unix-like operating system kernel, while Unix is a proprietary operating system developed by AT&T Bell Labs. Unix requires a license, whereas Linux is free and open-source.

Linux Interview Questions Answers 200 PART 1


3. Explain the Linux file system hierarchy.

Answer: The Linux file system hierarchy is structured in a tree-like format starting from the root directory (/). Important directories include /bin, /etc, /home, /var, /usr, and /tmp.


4. What is the root account?

Answer: The root account is the superuser account in Linux with unrestricted access to all commands, files, and system resources. It is used for system administration tasks.


5. How do you change file permissions in Linux?

Answer: Use the chmod command. For example, to set read, write, and execute permissions for the owner and read permissions for others, use:

chmod 744 filename

 

6. What is the difference between su and sudo?

Answer: su switches the user to the root account, requiring the root password. sudo allows a permitted user to execute a command as the superuser or another user, requiring the user's password.


7. How do you check the current runlevel?

Answer: Use the runlevel command:

runlevel


8. How do you list all installed packages in a Debian-based system?

Answer: Use the dpkg command:

dpkg --list


9. How do you view running processes in Linux?

Answer: Use the ps or top command. For a snapshot:

ps aux

For a dynamic view:

top


10. What is the use of the grep command?

Answer: grep searches for patterns within files. For example, to search for "error" in a file:

grep "error" filename


11. How do you display disk usage of directories?

Answer: Use the du command:

du -sh /path/to/directory


12. How do you check free disk space?

Answer: Use the df command:

df -h

 

13. What is a symbolic link?

Answer: A symbolic link is a type of file that points to another file or directory. It is created using the ln -s command:

ln -s /path/to/target /path/to/link


14. How do you find files containing a specific string?

Answer: Use the grep command with -r for recursive search:

grep -r "search_string" /path/to/directory


15. How do you compress files using tar?

Answer: Use the tar command with -czf to create a compressed archive:

tar -czf archive.tar.gz /path/to/directory


16. How do you extract files from a tar archive?

Answer: Use the tar command with -xzf to extract:

tar -xzf archive.tar.gz


17. How do you find the IP address of your system?

Answer: Use the ip or ifconfig command:

ip addr show

or

ifconfig


18. How do you view the contents of a file?

Answer: Use commands like cat, less, or more. For example:

cat filename


19. How do you change the hostname of a Linux system?

Answer: Use the hostnamectl command:

sudo hostnamectl set-hostname newhostname

 


Visit for latest Job Vacancies and News indianinQ8.com


Visit for More Forever Living Products - Forever Living Kuwait at https://foreverlivingkuwait.blogspot.com/

Linux Interview Questions Answers 200 PART 1



Kuwait bus routes and numbers, bus route kuwait CityBus, KPTC, KGL Mowsalat. find Kuwait’s public transport Muscat خط الحافلات الكويت.



What is SAP Landscape?



SAP Client Creation (SCC4) & Logical system (BD54) in SAP

20. What is the crontab command used for?

Answer: crontab is used to schedule jobs (commands or scripts) to run periodically. For example,

to edit the crontab file:

crontab -e


21. How do you add a user in Linux?

Answer: Use the adduser command:

sudo adduser username


22. How do you delete a user in Linux?

Answer: Use the deluser command:

sudo deluser username


23. How do you switch to another user account?

Answer: Use the su command:

su - username


24. How do you change file ownership?

Answer: Use the chown command:

sudo chown user:group filename


25. How do you view system logs?

Answer: Use the journalctl command for systemd logs or tail for log files. For example:

journalctl

or

tail -f /var/log/syslog


26. How do you kill a process by its PID?

Answer: Use the kill command:

kill PID


Linux Interview Questions Answers 200 PART 1


27. How do you forcefully kill a process?

Answer: Use the kill -9 command:

kill -9 PID


28. How do you find the PID of a process by its name?

Answer: Use the pgrep command:

pgrep processname

Linux Interview Questions Answers 200 PART 1


29. What is a package manager?

Answer: A package manager automates the process of installing, upgrading, configuring, and removing software packages. Examples include APT for Debian-based systems and YUM/DNF for Red Hat-based systems.


30. How do you update all packages in a Debian-based system?

Answer: Use the apt update and apt upgrade commands:

sudo apt update

sudo apt upgrade


31. How do you install a package in a Red Hat-based system?

Answer: Use the yum or dnf command:

sudo yum install package_name

or

sudo dnf install package_name


32. How do you remove a package in a Debian-based system?

Answer: Use the apt remove command:

sudo apt remove package_name


33. What is the difference between apt-get and apt?

Answer: apt is a higher-level interface for package management, providing a more user- friendly

set of commands that include the functionality of apt-get, apt-cache, and other lower- level tools.

 

34. What is the find command used for?

Answer: find is used to search for files and directories based on various criteria. For example, to find all .txt files:

find /path/to/search -name "*.txt"


35. How do you count the number of lines, words, and characters in a file?

Answer: Use the wc command:

wc filename


36. What is the purpose of the /etc/passwd file?

Answer: The /etc/passwd file contains user account information, including username, user ID, group ID, home directory, and shell.


37. What is the /etc/shadow file?

Answer: The /etc/shadow file contains encrypted user passwords and additional account information like password expiration.


38. How do you display the last 10 lines of a file?

Answer: Use the tail command:

tail filename


39. How do you display the first 10 lines of a file?

Answer: Use the head command:

head filename


40. How do you combine multiple files into one?

Answer: Use the cat command:

cat file1 file2 > combined_file


41. What is the purpose of the /etc/fstab file?

Answer: The /etc/fstab file contains information about file systems and their mount points, specifying how and where they should be mounted.

 

42. How do you mount a file system?

Answer: Use the mount command:

sudo mount /dev/sdX1 /mnt


43. How do you unmount a file system?

Answer: Use the umount command:

sudo umount /mnt


44. What is the purpose of the /proc directory?

Answer: The /proc directory is a virtual file system providing information about system processes and kernel parameters.


45. How do you change the current directory?

Answer: Use the cd command:

cd /path/to/directory


46. How do you display the current directory?

Answer: Use the pwd command:

pwd


47. How do you create a new directory?

Answer: Use the mkdir command:

mkdir new_directory


48. How do you remove an empty directory?

Answer: Use the rmdir command:

rmdir empty_directory

Linux Interview Questions Answers 200 PART 1


49. How do you remove a directory and its contents?

Answer: Use the rm -r command:

rm -r directory_name

 

50. What is the purpose of the /etc/hosts file?

Answer: The /etc/hosts file maps hostnames to IP addresses, providing a way to associate names

with IP addresses without using DNS. 


  

No comments: