Linux Overview and Core Concepts
Linux Overview and History
- Origins: Linux is a Unix-like operating system. It was inspired by Unix and designed to be a free and open-source alternative.
- Development: Created by Linus Torvalds in 1991. It uses many components from the GNU Project, which aimed to create a free Unix system.
Core Components of Linux
- Kernel: The core of the operating system. Manages hardware, memory, processes, and system calls.
- GNU Utilities: A collection of software tools (e.g., compilers, editors, and shell utilities) that complement the kernel.
- Shell (Bash): A command-line interface to interact with the system and run scripts.
- System Calls: Interface for applications to communicate with the kernel, e.g., opening files, creating processes.
Basic Linux Commands Demonstrated
echo
– Prints text to the console
man
– Displays manual pages for commands
touch
– Creates a new, empty file
ls
– Lists files and directories
cat
– Displays the contents of a file
stat
– Shows metadata about a file
rm
– Removes files
>
– Redirects output to a file (overwrite)
<
– Redirects input from a file
|
– Used to pipe output from one command to another
Additional Topics Covered
- Bash Scripting: Automates tasks using shell scripts, supports variables, loops, and conditionals.
- User Management: Handling user accounts, including managing root (superuser) privileges.
- File System Structure: Hierarchical structure starting from
/
. Key directories: /home
, /etc
, /bin
, /var
, /usr
.
- File Permissions: Permissions (read, write, execute) for user, group, and others. Managed using
chmod
and viewed using ls -l
.
- Process Management: Commands like
ps
, top
, kill
to monitor and control processes.
Linux Distributions (Distros)
- Definition: Variants of Linux bundled with different software and package managers.
- Examples: Ubuntu, Fedora, Debian, Arch, CentOS.
- Differences: Include package management systems, default GUIs, and target audiences (newbie vs. advanced users).