$ whoami
$ w
$ who
$ finger (if system configured for it)
$ uname -a # What OS is this? For what architecture? What kernel version?
$ cat /proc/cpuinfo # What CPU(s)?
$ dmesg # Hardware & driver information
$ cat /etc/fedora-release
$ cat /etc/debian_version
# What version of a Linux distribution is this? redhat, fedora, debian, etc?
$ uname -n # Which host am I logged into?
$ cat /etc/hosts # Local map of what IP addresses are mapped to what hostnames
$ cat /etc/hostname* # local hostname; may differ from hostname on domain name server
$ hostname
$ cat /etc/dhcp/dhclient* # may contain hostname request to domain name server
$ /sbin/ifconfig # What's my IP address?
C:\> ipconfig # Windows
$ ip addr # ifconfig considered deprecated; use ip instead
$ host <ip address from ifconfig output> # What's my hostname on the name server?
$ nslookup <ip address from ifconfig output>
$ pwd # present working directory
cslab00: /export/home/uf/jchung $
who -r
. run-level 3 Jan 21 14:50 3 0 S
jchung@rockhopper:~$ who -r
run-level 5 2009-01-07 00:10 last=3
Default run level defined in /etc/inittab on Sys V / Linux:
Table - System V Run Levels
-------------------------------------------------------------------------------------------
Run Level Names and Uses
-------------------------------------------------------------------------------------------
0 Powerdown state; conditions where it is safe to turn the power off.
1 Administrative state.
s or S Single-user mode.
2 Multi-user mode; Normal operating state for isolated,
non-networked systems.
3 Remote File Sharing (RFS) state. Alternative state for networking use. (Normal
multi-user state for OSF/1; other Sys V may use state 2).
4 User-definable state. (Also not normally used; state 2 used instead).
5 Firmware state; Used for some types of maintenance on some systems.
6 Shutdown and reboot state; used to reboot the system from some other running
state (s, 2, 3 or 4) to state 0 then immediately back to normal operating state.
-------------------------------------------------------------------------------------------