linux
system message
- grep MenTotal / proc / meminfo # view the total amount of system memory
- cat / etc / issue # View system name
- cat / etc / lsb-release # to view the system name, version number
- uname -a # View kernel information
- ls / root | grep vmlinuz # Viewing the kernel information
User Info
- whoami # I'm logged in user
- The current user id id #
- id test # View test user information
- w # View the current system user activity
- lastlog # view the user login log
- cat / etc / passwd # list of users
- cat / etc / shadow # get user hash
- cat / etc / group # View User Groups
- grep -v -E "^ #" / etc / passwd | awk -F: '$ 3 == 0 {print $ 1}' # listed superuser
- awk -F: '($ 3 == "0") {print}' / etc / passwd # # lists details superuser note the space
Process Information
- ps aux # See all process information
- ps -ef # ibid.
- Not much difference between the two, slightly different format and columns
- ps -ef | grep java # View java process information
Internet Information
/ Etc / network / interfaces # card information
- NIC configuration
- auto ens??
iface ens?? inet static
address ?.?.?.?
netmask 255??
gateway ??
- ifconfig
- View routes route #
arp -a # View ARP cache case
Service Information
- cat / etc / serivice # View existing service
- cat / etc / serices | grep ** # to view the corresponding service
Service Configuration
- cat /etc/syslog.conf
- cat /etc/chttp.conf
- cat /etc/lighttpd.conf
- cat /etc/cups/cupsd.conf
- cat /etc/inetd.conf
- cat /etc/apache2/apache2.conf
- cat /etc/my.conf
- cat /etc/httpd/conf/httpd.conf
- cat /opt/lampp/etc/httpd.conf
Log information
/ Var / log
- /var/log/apache2/access.log #http log
- /var/log/mysql/error.log #mysql log
- /var/log/apt/history.log #apt log
- / Home directory information
- who / var / log / btmp # user login information
- who / var / log / wtmp # user login information
- ~/.bash_history
- echo> .bash_history # class log deleting these documents
- history # command operation history
Delete history -c #
Software Information
- dpkg -l # View installed packages
- rpm -qa # View installed packages