Example 3.1 - Kali Linux Revealed

Example 3.1 Example of information provided by
lspci
and
lsusb
$ lspci
[...]
00:02.1 Display controller: Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller (rev 03)
00:1c.0 PCI bridge: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) PCI Express Port 1 (rev 03)
00:1d.0 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #1 (rev 03)
[...]
01:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5751 Gigabit Ethernet PCI Express (rev 01)
02:03.0 Network controller: Intel Corporation PRO/Wireless 2200BG Network Connection (rev 05)
$ lsusb
Bus 005 Device 004: ID 413c:a005 Dell Computer Corp.
Bus 005 Device 008: ID 413c:9001 Dell Computer Corp.
Bus 005 Device 007: ID 045e:00dd Microsoft Corp.
Bus 005 Device 006: ID 046d:c03d Logitech, Inc.
[...]
Bus 002 Device 004: ID 413c:8103 Dell Computer Corp. Wireless 350 Bluetooth
These programs have a -v option that lists much more detailed (but usually unnecessary) informa-
tion. Finally, the
lsdev
command (in the procinfo package) lists communication resources used by
devices.
The
lshw
program is a combination of the above programs and displays a long description of the
hardware discovered in a hierarchical manner. You should attach its full output to any report
about hardware support problems.
61
Chapter 3 — Linux Fundamentals
3.5. Summary
In this section, we took a whirlwind tour of the Linux landscape. We discussed the kernel and user
space, reviewed many common Linux shell commands, discussed processes and how to manage
them, reviewed user and group security concepts, discussed the FHS, and toured some of the most
common directories and files found on Kali Linux.
Summary Tips:
• Linux is often used to refer to the entire operating system but in reality Linux itself is the
operating system kernel that is started by the boot loader, which is itself started by the
BIOS/UEFI.
• User space refers to everything that happens outside of the kernel. Among the programs
running in user space, there are many core utilities from the
GNU project
3
, most of which
are meant to be run from the command line (a text-based interface that allows you to enter
commands, execute them, and view the results). A shell executes your commands within
that interface.
• Common commands include:
pwd
(print working directory),
cd
(change directory),
ls
(list
file or directory contents),
mkdir
(make directory),
rmdir
(remove directory),
mv
,
rm
, and
cp
(move, remove, or copy file or directory respectively),
cat
(concatenate or show file),
less
/
more
(show files a page at a time),
editor
(start a text editor),
find
(locate a file or
directory),
free
(display memory information),
df
(show disk free space),
id
(display the
identity of the user along with the list of groups they belong to),
dmesg
(review kernel logs),
and
journalctl
(show all available logs).
• You can inspect the hardware on a Kali system with several commands:
lspci
(list PCI de-
vices),
lsusb
(list USB devices), and
lspcmcia
lists PCMCIA cards.
• A process is a running instance of a program, which requires memory to store both the pro-
gram itself and its operating data. You can manage processes with commands like:
ps
(show
processes),
kill
(kill processes),
bg
(send process to background),
fg
(bring background
process to foreground), and
jobs
(show background processes).
• Unix-like systems are multi-user. They support multiple users and groups and allow con-
trol over actions, based on permissions. You can manage file and directory rights with sev-
eral commands, including:
chmod
(change permissions),
chown
(change owner), and
chgrp
(change group).
• As with other professional Linux distributions, Kali Linux is organized to be consistent with
the Filesystem Hierarchy Standard (FHS), allowing users coming from other Linux distributions
to easily find their way around Kali.
• Traditionally, application configuration files are stored under your home directory, in hid-
den files or directories starting with a period (or dot).
3
https://www.gnu.org/
62
Kali Linux Revealed
Now that you have a handle on Linux fundamentals, let’s get Kali Linux set up and running.
63
Chapter 3 — Linux Fundamentals
|