Essential Linux Basics: All You Need to Get Started
This comprehensive guide covers Linux fundamentals, including an overview of the operating system, essential keyboard shortcuts, common file‑management commands, disk navigation, network utilities, and core system administration tools, providing beginners with everything required to start using Linux effectively.
Linux Overview
Linux (officially GNU/Linux) is a free, open‑source Unix‑like operating system. Its kernel was first released by Linus Torvalds on 5 October 1991. The system follows POSIX standards, supports multi‑user, multitasking, multithreading and both 32‑bit and 64‑bit hardware. It can run the major Unix tools, applications and network protocols. Major distributions include Ubuntu, Red Hat, CentOS, Debian, Fedora, SuSE and OpenSUSE.
Common Keyboard Shortcuts
[Tab] – Auto‑completes commands, file names, directories or options.
[Ctrl+C] – Terminates the running command or process immediately.
[Ctrl+Z] – Sends the current job to the background.
[Ctrl+A] – Moves the cursor to the beginning of the line.
[Ctrl+E] – Moves the cursor to the end of the line.
[Ctrl+U] – Clears from the cursor position to the start of the line.
[Ctrl+K] – Clears from the cursor position to the end of the line.
[Ctrl+W] – Deletes the word preceding the cursor.
[Ctrl+Y] – Pastes text previously erased with Ctrl+U/K/W.
[Ctrl+P] – Shows the previous command in history (similar to PgUp).
[Ctrl+N] – Shows the next command in history (similar to PgDn).
[Ctrl+R] – Searches command history.
[Ctrl+←/→] – Moves the cursor word by word.
[Alt‑d] – Deletes the word after the cursor.
Frequently Used Commands
File Management
cat – Concatenates and prints files. cat -n textfile1 > textfile2 Adds line numbers to textfile1 and writes the result to textfile2. cat -b textfile1 textfile2 >> textfile3 Adds line numbers (excluding blank lines) and appends to textfile3. cat /dev/null > /etc/test.txt Clears the content of /etc/test.txt.
more – Displays file content page by page. more -s testfile Shows testfile while squeezing consecutive blank lines. more +20 testfile Starts display from line 20.
rm – Removes files or directories. rm test.txt Deletes a single file. rm -r homework Recursively deletes a directory. rm -r * Deletes all files and sub‑directories in the current directory.
cp – Copies files or directories. cp -r test/ newtest Copies the entire test directory to newtest.
read – Reads a line from standard input. read -p "Enter name: " name Prompts the user and stores the input in name.
Disk Management
cd – Changes the current directory. cd /usr/bin Navigates to /usr/bin. cd ~ Navigates to the user's home directory. cd ../.. Moves up two directory levels.
mkdir – Creates directories. mkdir runoob Creates a directory named runoob. mkdir -p runoob2/test Creates runoob2 and its sub‑directory test; the -p flag creates parent directories as needed.
pwd – Prints the current working directory. pwd Outputs the absolute path of the current directory.
rmdir – Removes empty directories. rmdir AAA Deletes the empty directory AAA. rmdir -p BBB/Test Removes Test and, if BBB becomes empty, removes BBB as well.
ls – Lists directory contents. ls -ltr s* Lists files starting with s in reverse chronological order. ls -lR /bin Recursively lists all files under /bin with detailed information. ls -AF Shows all entries, appending * to executables and / to directories.
Network Communication
telnet – Connects to a remote host. telnet 192.168.1.2 Logs into the host at 192.168.1.2.
ping – Tests host reachability using ICMP. ping www.w3cschool.cc Sends echo requests and displays round‑trip times.
ifconfig – Displays or configures network interfaces. ifconfig Shows interface details such as IP address, MAC address and packet statistics.
System Management
exit – Exits the current shell. exit Terminates the shell session (status 0 indicates success).
kill – Sends signals to processes. kill 12345 Sends the default SIGTERM to process 12345. kill -KILL 123456 Forcefully terminates process 123456 with SIGKILL.
ps – Reports process status. ps -ef | grep php Filters for processes containing the keyword php.
sudo – Executes commands with super‑user privileges. sudo ls Runs ls as root (requires password if not cached).
su – Switches user identity. su -c ls root Executes ls as root and then returns to the original user. su - clsung Switches to user clsung and changes to that user's home directory.
free – Displays memory usage. free -h Shows total, used and free memory in human‑readable units. free -t Shows a total line that aggregates memory and swap. free -s 10 Repeats the memory report every 10 seconds.
clear – Clears the terminal screen. clear Removes all previous output from view.
Linux Tech Enthusiast
Focused on sharing practical Linux technology content, covering Linux fundamentals, applications, tools, as well as databases, operating systems, network security, and other technical knowledge.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
