Ubuntu Interview Questions and Answers
Ques 21. What is the purpose of the 'tar' command?
The 'tar' command is used for compressing and archiving files and directories.
Example:
tar -cvzf archive.tar.gz /path/to/directory
Is it helpful?
Add Comment
View Comments
Ques 22. How do you add a user to a group in Ubuntu?
You can add a user to a group with the 'usermod' command. For example: sudo usermod -aG groupName username
Is it helpful?
Add Comment
View Comments
Ques 23. Explain the purpose of the 'journalctl' command.
The 'journalctl' command is used to query and display messages from the journal, managed by 'systemd'.
Example:
journalctl
Is it helpful?
Add Comment
View Comments
Ques 24. How do you find the process ID (PID) of a running process in Ubuntu?
You can use the 'pgrep' or 'ps' command to find the PID of a running process.
Example:
pgrep processName
Is it helpful?
Add Comment
View Comments
Ques 25. What is the purpose of the 'apt-cache' command?
The 'apt-cache' command is used to query and display information about packages in the APT cache.
Example:
apt-cache show packageName
Is it helpful?
Add Comment
View Comments
Most helpful rated by users:
- What is the default package manager in Ubuntu?
- How do you update the package list with APT?
- How can you check the version of Ubuntu installed on your system?
- Explain the purpose of the 'sudo' command.
- What is the purpose of the 'grep' command?