a dual-use question! Either a Software Archaeologist or an Evil Hacker could use the answers to this question! Now, which am I?
I always used to use
ps -ef versus
ps -augxww to find out what I was on. Linux and System V boxes tended to like "-ef" and error on "-augxww", vice versa for BSD and old SunOS machines. The output of
ps can let you know a lot as well.
If you can log in as root, and it's a Linux machine, you should do
lspci - that will get you 80% of the way towards knowing what the hardware situation is.
dmesg | more can help you understand any current problems on just about anything.
It's beginning to be phased out, but doing
ifconfig -a can usually tell you a lot about the network interfaces, and the networking. Running
ethtool on the interfaces you see in
ifconfig output that look like cabled ethernet can give you some info too.
ip route or
netstat -r can be informative about Internet Protocol routing, and maybe something about in-use network interfaces.
mount invocation can tell you about the disk(s) and how they're mounted.
uptime, and then
last | more can tell you something about the current state of maintenance. Uptimes of 100+ days probably means "it's time to change the oil and fluids", metaphorically speaking. Running
who is also
/etc/hosts can tell you about the DNS setup of that machine. Maybe do
nslookup google.com or
dig bing.com to see if DNS is mostly functional.
It's always worth watching what errors ("command not found") and what variants of commands ("ps -ef" vs "ps augxww") work to determine what variant of Unix or Linux or BSD you just ended up on.
The presence or absence of a C compiler, and where it lives is important. Do
which cc or better,
which -a cc to find them.