I'm always excited to take on new projects and collaborate with innovative minds.
contact@niteshsynergy.com
https://www.niteshsynergy.com/
Linux is an open-source Unix-like operating system-based family on the Linux kernel, and the OS kernel was first published on 17 September 1991 by Linus Torvalds. Typically, Linux is packaged as the Linux distribution, which contains the supporting libraries and system software and kernel, several of which are offered by the GNU Project.
Linux is a powerful and versatile operating system kernel that serves as the foundation for a wide range of operating systems, often referred to as Linux distributions. Learning Linux involves progressing through stages, from basic concepts to advanced techniques. Here's a breakdown of Linux concepts at each level:
Using Linux commands over a Windows system requires creating an environment where Linux commands can run. Here’s a guide on how to set it up and use these commands effectively on Windows.
The Windows Subsystem for Linux (WSL) allows you to run a Linux environment directly on Windows without a virtual machine.
Open PowerShell as Administrator and run:
Install additional distributions using:
If you don’t want to set up WSL, use Git Bash or other terminal emulators.
ls
, cd
, pwd
, grep
, and more.Cygwin is another tool that provides a Linux-like environment for Windows.
bash
, grep
, vim
, etc.).A virtual machine (VM) allows you to run a full Linux OS on Windows.
If you don’t want to install anything, you can use online Linux terminals.
Docker allows you to run lightweight Linux containers on Windows.
Open PowerShell or Command Prompt and run:
This stage introduces you to the Linux operating system, basic commands, and essential tools.
/
), home (/home
), bin (/bin
), etc./etc/passwd
) vs. relative (../dir
).ls
, cd
, pwd
.cp
, mv
, rm
, touch
, cat
.less
, more
, head
, tail
.chmod
, chown
.apt-get
, dpkg
.yum
, dnf
, rpm
.nano
, gedit
.vim
, emacs
.ps
, top
, kill
.bg
, fg
, jobs
.This stage focuses on user-level customization, shell scripting, and system management.
.sh
files.if-else
, for
, while
.$var
, $1
, $2
.>
, <
, |
.ping
, curl
, wget
, ifconfig
, netstat
.scp
, rsync
.adduser
, passwd
, deluser
.groupadd
, gpasswd
.df
, du
.free
.dmesg
, /var/log/
.setfacl
, getfacl
.crontab
.This stage involves in-depth system administration, networking, and kernel-related tasks.
systemctl
.tar
, rsync
, and cron-based backups.iptables
, ufw
.tcpdump
, traceroute
.lsmod
, insmod
, rmmod
.SELinux
, AppArmor
.gpg
, openssl
, disk encryption.nmap
, lynis
.awk
, sed
, grep
) for data processing.
ls
: List files and directories.ls -l
: Long format with permissions, sizes, and dates.ls -a
: Show hidden files.cd
: Change directory.cd /home/user/docs
: Go to the docs
folder.cd ..
: Move one level up.pwd
: Show current directory./home/user/docs
.cp
: Copy files.cp file1.txt /backup/
: Copy file1.txt to /backup
.cp -r dir1 dir2
: Copy directory dir1
to dir2
.mv
: Move or rename files.mv file1.txt /archive/
: Move file to /archive
.mv oldname.txt newname.txt
: Rename a file.rm
: Remove files or directories.rm file.txt
: Delete a file.rm -r folder
: Delete a directory recursively.cat
: Display file contents.cat file.txt
: Show contents of file.txt
.less
: View large files page by page.less logfile.log
: Scroll through log files.head
and tail
: View start or end of a file.head -n 5 file.txt
: Show the first 5 lines.tail -n 10 file.txt
: Show the last 10 lines.nano
/ vim
: Edit files.nano config.txt
: Open file in a simple text editor.vim script.sh
: Open file in Vim for advanced editing.find
: Search for files by name or properties.find / -name file.txt
: Find file.txt
starting from /
.find . -type f -size +1M
: Find files larger than 1MB in the current directory.grep
: Search for text in files.grep "error" logfile.log
: Find "error" in the log file.grep -i "hello" file.txt
: Case-insensitive search.locate
: Quickly find files by name (requires updatedb
).locate file.txt
: Locate the file anywhere.adduser
/ useradd
: Add a new user.adduser newuser
: Create a user with a home directory.passwd
: Change a user’s password.passwd newuser
: Set a password for newuser
.chown
: Change file owner.chown user:group file.txt
: Set user and group ownership.chmod
: Modify file permissions.chmod 644 file.txt
: Set read/write for owner, read-only for others.chmod +x script.sh
: Make a file executable.ps
: Display running processes.ps aux
: Show all processes with details.top
/ htop
: Interactive process monitoring.top
: View real-time CPU/memory usage.kill
: Terminate a process by PID.kill 1234
: Kill the process with PID 1234.jobs
/ bg
/ fg
: Manage background/foreground tasks.jobs
: List running jobs.bg %1
: Move job 1 to the background.fg %1
: Bring job 1 to the foreground.df
: Display disk space usage.df -h
: Show human-readable sizes.du
: Check directory size.du -sh folder/
: Show total size of a folder.free
: Check memory usage.free -h
: Human-readable memory stats.dmesg
: Display boot and kernel logs.dmesg | grep error
: Filter errors from kernel logs.ping
: Test network connectivity.ping google.com
: Check if Google is reachable.curl
/ wget
: Fetch data from URLs.curl http://example.com
: Display webpage content.wget http://example.com/file.txt
: Download a file.ifconfig
: Display network interfaces (deprecated; use ip
).ifconfig
: Show IP and network details.netstat
: Display network connections.netstat -tuln
: Show active listening ports.tar
: Archive files.tar -cvf backup.tar /data/
: Create a tar archive.tar -xvf backup.tar
: Extract an archive.gzip
/ gunzip
: Compress or decompress files.gzip file.txt
: Compress file to file.txt.gz
.gunzip file.txt.gz
: Decompress file.zip
/ unzip
: Compress to or extract from .zip
.zip archive.zip file1 file2
: Create a zip file.unzip archive.zip
: Extract files.crontab
: Schedule recurring tasks.crontab -e
: Edit cron jobs.0 3 * * * /backup.sh
(Run at 3 AM daily).at
: Schedule one-time tasks.at 6:00
: Run a task at 6:00 AM.awk
: Process and analyze text.awk '{print $1}' file.txt
: Print the first column.sed
: Stream editor for text manipulation.sed 's/old/new/g' file.txt
: Replace "old" with "new" globally.strace
: Debug process system calls.strace ./program
: Trace a program's system calls.
Webminal
→ Here we are going to use Webminal terminal :
Please sure give userName & Pwd while creating account…