Google Cybersecurity study materials
Google Cybersecurity study resources

Google Cybersecurity: Tools of the Trade: Linux and SQL

Google Cybersecurity · Work through your exam, one topic at a time.

All guide sections

Tools of the Trade: Linux and SQL

Linux

Architecture layers: user, applications, shell, kernel, hardware. The filesystem starts at /; /home holds user directories, /etc holds configuration, /var/log holds logs, /tmp is temporary, /bin and /usr/bin hold executables. Navigation and reading: pwd, ls -la, cd, cat, head, tail, less. grep searches text, find locates files, man shows documentation, sudo elevates privileges, and the pipe | sends one command's output into the next.

Permissions come in three sets (owner, group, other) and three bits: read = 4, write = 2, execute = 1. chmod 740 gives the owner rwx, the group r--, others nothing. For directories, execute means the ability to enter or traverse.

Redirection: > overwrites a file, >> appends, 2> redirects errors.

SQL

A relational database stores data in tables of rows and columns. A primary key uniquely identifies a row; a foreign key points to another table's primary key to link records. The core query shape is SELECT columns FROM table WHERE condition ORDER BY column; GROUP BY collapses rows for aggregation and joins combine tables on a shared key.

Filters use =, <>, <, >, and LIKE with wildcards (% for any number of characters, _ for exactly one). AND requires both sides, OR either, NOT negates. Aggregates: COUNT, SUM, AVG, MIN, MAX.

Traps

Expect > versus >>, permission arithmetic, and WHERE versus HAVING (WHERE filters rows before grouping; HAVING filters groups after). String values in a WHERE clause need single quotes.

Rule of thumb

Read a chmod number left to right as three sums of 4/2/1, then ask: what exactly can 'other' do?