惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

GbyAI
GbyAI
Y
Y Combinator Blog
Martin Fowler
Martin Fowler
D
Docker
N
Netflix TechBlog - Medium
酷 壳 – CoolShell
酷 壳 – CoolShell
WordPress大学
WordPress大学
L
LangChain Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园 - 三生石上(FineUI控件)
博客园_首页
量子位
罗磊的独立博客
Blog — PlanetScale
Blog — PlanetScale
云风的 BLOG
云风的 BLOG
Microsoft Azure Blog
Microsoft Azure Blog
宝玉的分享
宝玉的分享
Apple Machine Learning Research
Apple Machine Learning Research
D
DataBreaches.Net
I
InfoQ
Engineering at Meta
Engineering at Meta
The Cloudflare Blog
H
Help Net Security
V
V2EX

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Linux Essentials
Aka · 2026-05-12 · via DEV Community

What is Linux?

Linux is an Operation System (just like Mac OS or Windows). It is free and open-source which means you can contribute to it. (Yaaay ^^)


Linux has distributions. But what is a Linux Distribution?

A Linux distribution is an operating system built on the Linux kernel. Think of them as different flavors in an ice cream truck. You can choose the one that suits your taste.


A Truck, full of linux distros

Now that we mentioned it, what is the Kernel?

The kernel is the core part of the operating system. It acts as a bridge between hardware and software, managing communication between them.

software-kernel-hardware

In Linux, we can interact with the operating system in two ways:

  1. GUI is where we use the mouse to click on buttons, icons (and etc.) to complete tasks.
  2. CLI is where we type commands in the terminal to perform tasks.

Now, hopefully, assuming most of us already know how to use the GUI, we can move on to learning…

…Linux commands.

Let`s start with the things we already learned, such as the kernel.


Command: Uname

For getting information about our system, we have the command uname. It prints kernel name, version, architecture, and hostname.

uname

There are a bunch of useful commands related to the system.

  • uptime shows how long the system has been running.
  • whoami shows our current user.
  • top showsrunning processes and system usage.
  • htop is improved version of top.
  • free -h shows memory usage.
  • df -h shows disk space usage.

Command: hostname

hostname

If it is not already obvious from the command itself, this is for checking our hostname (which is ubuntu). But how can we change the hostname? We can do it with sudo hostnamectl set-hostname new-hostname command. Make sure to use sudo if you are not already root.

Now, what is sudo and why do we need it?

sudo means we are running a command with root access. In Linux (unlike win admin), root is the main user with full control over the system and can do literally anything. So when we put sudo in front of a command, we are running that command with root privileges for that moment.


Command: pwd

Now let`s see our path by pwd command.

pwd

Since we talk about paths. It is good to know about two types of paths:

Absolute Path and Relative Path

An absolute path is the full location of a file or directory, starting from the root directory /. It never changes because this path works from anywhere on the system.

A relative path shows the location of a file or directory based on the current directory, not from the root /. If you change your location, the path will change.

Alice-in-Wonderland

We can think of it as an address on a piece of paper. Let’s say we want to find the way from our home to the rabbit hole. The full (absolute) path is /home/farm/garden/tree/rabbit-hole. No matter where we are this won’t change.

But now imagine we are already somewhere inside the farm. We ask a caterpillar if he knows the way. He says “garden/tree/rabbit-hole”. This is a relative path.

We walk some more and reach the garden. Then we ask the Cheshire Cat again, and he says “tree/rabbit-hole”. Now the path has changed because we are in the garden. This is how relative path works. It depends on our current location (where we are now).


Command: mkdir

We can create a folder there. Type mkdir directory_name.

mkdir

To delete the folder: rmdir example_folder or rm -rf example_folder.

rmdir


Command: ls

How to see what we created? ls command lists files in a directory.

ls

You can add some flags (options) to the command ls. Such as:

  • ls -a (show all files including hidden ones)
  • ls -l (long format listing)

ls -a


Command: alias

How about we try to command ll? Normally, it is alias for ls -l, but since our Linux is Ubuntu default, it is ls -alf (which includes all hidden files, long detailed formats and symbols like / for directories).

alias

So, what is alias? It is a shortcut for a longer command. Such as ll. The structure is simple. alias shortcut='full_command'

example-alias


Command: cd

In Linux we have cd command for navigation.

cd

We used cd to move to the example_directory. In order to return, we type cd .. command.


Command: touch

Let's say we want to create a file in this directory. There are several ways to do this basic task, however we will start with the easiest: The command touch.

touch

To delete the file: rm file_name.txt or rm -rf file_name.txt

rm1
rm2

Warning: rm -rf /* deletes your entire system.


Text editors

The other way to create a file is using one of the text editors in Linux. Nano, Vim (Vi Improved) or Vi (old).

text-editor1
text-editor2
text-editor3
text-editor4


Command: Cat ฅ^>⩊<^ ฅ

We can also check out what is inside our files by cat command.

cat

With cat command we can more than that. What if we check a system file that contains details about our Linux distro?

info-distro

We can also create a file with cat command and > symbol.

create-file


Command: grep

If we want to search for a specific word inside a file, we can use the grep command.

grep

Another way to use grep is by combining it with the cat command.

grep-cat

The | (pipe) operator allows us to pass the output of one command (cat) as input to another command (grep).


Command: echo

Another way of creating a file is using echo command.

echo

Normally, echo will print text to the terminal.

print-echo

We can also print variables but do not forget the symbol $.

symbol


Lastly, we have cp and mv commands.

  1. cp command copies a file or directory to another location.

cp1
cp2

  1. mv changes the location of a file or directory.

mv


A question for you!!! (〃 ̄ω ̄〃ゞ
What is the difference between mv and cp that you have encountered?