Ubuntu 面试题与答案
问题 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
这有帮助吗?
添加评论
查看评论
问题 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
这有帮助吗?
添加评论
查看评论
问题 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
这有帮助吗?
添加评论
查看评论
问题 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
这有帮助吗?
添加评论
查看评论
问题 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
这有帮助吗?
添加评论
查看评论
用户评价最有帮助的内容:
- 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 'ls' command in Linux?