Building on the essentials covered in Part 1, this article introduces more advanced Linux commands. These commands will enhance your capability to manage your system, handle files, and perform basic networking tasks.
System Information and Management
top: This command provides a dynamic, real-time view of running processes. It’s invaluable for monitoring system performance.
df: Short for “disk free,” this command displays the amount of available disk space on file systems.
free: This command shows the amount of free and used memory in the system.
ping: Use it to check your connection to a server. Example:
ip: These commands are used to configure, control, and query TCP/IP network interface parameters.
netstat: It displays network connections, routing tables, and interface statistics.
Manipulating Text and Files
grep(Advanced Usage): Beyond basic searches,
grepcan be used with regular expressions for powerful pattern matching.
sort: This command sorts the contents of a file. For example,
sort file.txtsorts the contents of ‘file.txt’.
uniq: Often used with
sort, it reports or omits repeated lines in a file.
Archiving and Compression
tar: The “tape archive” command is used for combining multiple files into a single archive file.
bzip2: These are popular tools for file compression.
File Transfer and Remote Access
scp: Secure copy command for transferring files over a network securely.
ssh: Secure Shell (SSH) is used for secure remote login and command execution.
Using Pipes and Redirection
- Pipes (
|): Allow the output of one command to be used as the input for another.
- Redirecting Output (
>>): Use these to redirect command output to a file.
Writing Basic Shell Scripts
- Basic Script Structure: Introduction to writing simple bash scripts for automating tasks.
- Using Variables and Conditional Statements: Basic elements of scripting to create more dynamic and functional scripts.
This article covers essential commands that are a step up from the basics, setting the stage for more complex Linux operations. Regular practice and experimentation with these commands are key to developing proficiency in Linux.