To collect an information about a your system in Unix (GNU/Linux) you need known several useful commands.
Information about an operation system
$ lsb_release -idrc
Distributor ID: Debian
Description: Debian GNU/Linux 8.6 (jessie)
Release: 8.6
Codename: jessie
Information about a CPU architecture such as number of CPU’s, cores, CPU family model, CPU caches, threads, processor
$ lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 2
On-line CPU(s) list: 0,1
Thread(s) per core: 1
Core(s) per socket: 2
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 42
Model name: Intel(R) Pentium(R) CPU B960 @ 2.20GHz
Stepping: 7
CPU MHz: 1416.335
CPU max MHz: 2200.0000
CPU min MHz: 800.0000
BogoMIPS: 4390.07
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 2048K
NUMA node0 CPU(s): 0,1
Information about a kernel, a machine hardware name and an operating system
$ uname -a
Linux localhost 3.16.0-4-amd64 #1 SMP Debian 3.16.36-1+deb8u2 (2016-10-19) x86_64 GNU/Linux
Host name
$ hostname
localhost
Private IP address (ipv4 version) (I hidden last digits own IP as XX)
$ hostname -I
192.168.1.XX
Public IP address (ipv4 version) (need connected to the Internet)
$ dig +short myip.opendns.com @resolver1.opendns.com
91.202.144.118
Information about an system (hardware) (pared down)
$ sudo dmidecode -t system
System Information
Manufacturer: Acer
Product Name: Aspire E1-531G
Version: V2.11
Serial Number: NXM7BEU0013010B0EF1601
UUID: 332A4CE1-CB4B-E211-87F5-20898452C545
Wake-up Type: Power Switch
SKU Number: Aspire E1-531G_064A_V2.11
Family: Type1Family
Information about an processor (pared down)
$sudo dmidecode -t processor
Processor Information
Socket Designation: U3E1
Type: Central Processor
Family: Pentium
Manufacturer: Intel(R) Corporation
ID: A7 06 02 00 FF FB EB BF
Signature: Type 0, Family 6, Model 42, Stepping 7
Flags:
FPU (Floating-point unit on-chip)
********
VME (Virtual mode extension)
Version: Intel(R) Pentium(R) CPU B960 @ 2.20GHz
Voltage: 1.1 V
External Clock: 100 MHz
Max Speed: 4000 MHz
Current Speed: 2200 MHz
Status: Populated, Enabled
Upgrade: Socket rPGA988B
L1 Cache Handle: 0x000B
L2 Cache Handle: 0x000C
L3 Cache Handle: 0x000D
Serial Number: To Be Filled By O.E.M.
Asset Tag: To Be Filled By O.E.M.
Part Number: To Be Filled By O.E.M.
Core Count: 2
Core Enabled: 2
Thread Count: 2
Characteristics:
64-bit capable
Multi-Core
Execute Protection
Power/Performance Control
Desktop environment
A name of desktop environment keeping in the environment variable "DESKTOP_SESSION". But if the environment variable "DESKTOP_SESSION" is "default" (as in my case), try getting a value from the environment variable "XDG_CURRENT_DESKTOP".
$ echo $DESKTOP_SESSION
default
$ echo $XDG_CURRENT_DESKTOP
GNOME
For detect a version of desktop environment you need more efforts, because there has not built-in utilities. This command tested only my computer with the Gnome shell, but must work with other popular graphical desktop environment: KDE, Mate, Cinnamon, LXDE, Xfce.
$ pgrep -l "gnome|kde|mate|cinnamon|lxde|xfce" | egrep "-shell$" | awk '{print $2}' | xargs apt-cache show
Package: gnome-shell
Version: 3.14.4-1~deb8u1
Installed-Size: 6910
Maintainer: Debian GNOME Maintainers <[email protected]>
Architecture: amd64
Depends: gir1.2-clutter-1.0 (>= 1.17), gir1.2-glib-2.0 (>= 1.39.90-4~), gir1.2-gtk-3.0 (>= 3.8), gir1.2-mutter-3.0 (>= 3.14.4), gir1.2-networkmanager-1.0, gir1.2-soup-5
Recommends: gkbd-capplet, gnome-contacts, gnome-control-center, gnome-user-guide, unzip, gdm3 (>= 3.10.0.1-3~)
Conflicts: gnome-screensaver (<< 3.6)
Breaks: fglrx-driver (<< 1:11-10), gdm3 (<< 3.10.0.1-3~), gnome-control-center (<< 1:3.0), gnome-session (<< 3.0), gnome-tweak-tool (<< 3.5)
Description-en: graphical shell for the GNOME desktop
The GNOME Shell provides core interface functions like switching
windows, launching applications or see your notifications. It takes
advantage of the capabilities of modern graphics hardware and
introduces innovative user interface concepts to provide a
delightful and easy to use experience. GNOME Shell is the defining
technology of the GNOME 3 user experience.
Description-md5: 51a5a94e6b632e350489b7b8d27ab9fc
Homepage: http://live.gnome.org/GnomeShell
Tag: implemented-in::c, implemented-in::ecmascript, interface::x11,
role::program, uitoolkit::gtk
Section: gnome
Priority: optional
Filename: pool/main/g/gnome-shell/gnome-shell_3.14.4-1~deb8u1_amd64.deb
Size: 637652
MD5sum: 183a6bdcd8b34c6a56c09add66301d4a
SHA1: a11964152940a4a70e3d9ce93a6f21bb0a661379
SHA256: ff2ce3aa442012971ba5526f488568bbde6d53a8dbb71b95a587792e903033e3
Information about a screen
$ xrandr --current
Screen 0: minimum 320 x 200, current 1366 x 768, maximum 8192 x 8192
LVDS1 connected primary 1366x768+0+0 (normal left inverted right x axis y axis) 344mm x 194mm
1366x768 60.00*+
1360x768 59.80 59.96
1024x768 60.00
800x600 60.32 56.25
640x480 59.94
VGA1 disconnected (normal left inverted right x axis y axis)
HDMI1 disconnected (normal left inverted right x axis y axis)
DP1 disconnected (normal left inverted right x axis y axis)
If you need a good tool for similar tasks and more features, I recommend the "HardInfo" - https://github.com/lpereira/hardinfo. It easy to install in Debian-based systems.
System profiler and benchmark tool for Linux systems

Based on
- http://www.tecmint.com/commands-to-collect-system-and-hardware-information-in-linux/
- https://en.wikibooks.org/wiki/Guide_to_Unix/Commands/System_Information
- https://www.cyberciti.biz/faq/how-to-find-my-public-ip-address-from-command-line-on-a-linux/
- Is there a way to retrieve the name of the Desktop Environment?
- https://askubuntu.com/questions/125062/how-can-i-find-which-desktop-enviroment-i-am-using
- https://unix.stackexchange.com/a/2673/202463