0% found this document useful (0 votes)
4 views

Linux Basics Learned

Uploaded by

satya1p618
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Linux Basics Learned

Uploaded by

satya1p618
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Linux Basics Overview

1. Basic Commands
Linux provides several basic commands for navigating and managing files in the system.
These include:
- ls: Lists the contents of a directory.
- cd: Changes the current directory.
- cp: Copies files or directories.
- mv: Moves or renames files or directories.
- rm: Removes files or directories.
- mkdir: Creates a new directory.
- touch: Creates a new empty file.

2. File Permissions
In Linux, every file and directory has associated permissions. The permissions control who
can read, write, or execute a file. File permissions are divided into three groups: owner,
group, and others.

Commands related to file permissions include:


- chmod: Changes the permission of a file or directory. The permissions are represented by
a combination of the letters r (read), w (write), and x (execute), or as octal values.
- chown: Changes the ownership of a file or directory.

3. Process Management
Process management is essential for controlling and monitoring system activity. Common
commands include:
- ps: Displays a list of currently running processes.
- top: Provides a real-time view of system processes and resource usage.
- kill: Terminates a process by its process ID (PID).

4. Networking Commands
Linux provides several commands to manage and troubleshoot network settings and
connectivity:
- ping: Tests the reachability of a host on an IP network.
- ifconfig: Configures network interfaces. It is used to display the current network interface
configurations.
- netstat: Displays network connections, routing tables, interface statistics, masquerade
connections, and multicast memberships.
5. Package Management
Package management systems allow you to install, update, and remove software in Linux.
Different Linux distributions use different package management tools:
- apt: Used in Debian-based distributions like Ubuntu for package management.
- yum: Used in Red Hat-based distributions like CentOS and Fedora for package
management.

6. Shell Scripting Basics


Shell scripting in Linux allows you to automate tasks by writing sequences of commands in
a script. Basic concepts include:
- Variables: Used to store data.
- Loops: Repeat actions multiple times (e.g., 'for', 'while').
- Conditions: Make decisions using 'if', 'else', and 'elif' statements.
- Executing a script: A script file can be executed using './script_name.sh', provided it has
executable permissions.

You might also like