在Linux中,你可以使用history命令来查看当前用户执行过的所有命令
history
如果你想要查看其他用户的命令历史,你需要具有相应的权限。例如,你可以使用sudo -u username history命令来查看名为username的用户的命令历史。请将username替换为实际的用户名。
sudo -u username history
此外,你还可以通过查看/var/log/auth.log(对于Debian/Ubuntu系统)或/var/log/secure(对于RHEL/CentOS系统)文件来获取其他用户的命令历史。请注意,这些文件可能需要root权限才能访问。