☠️
smadi0x86 Playground
  • 💀Welcome to smadi0x86 Playground
    • 🍷Resources
    • 🚬Projects
    • 🎓Certifications
    • 📌Pinned
    • ❓Questions
    • 📞Contact
  • 🏞️Cloud Native
    • Docker
      • Quick Reference
      • Introduction
      • Containers
      • Images
      • Storage & Volumes
      • Security
      • Cheatsheet
    • Git
    • Serverless Framework
    • YAML
  • 🔨Software Engineering
    • System Design
    • Environment Variables
    • JSON Web Tokens
  • 👾Architecture
    • C Language
      • Introduction
      • Calling Conventions
      • GCC Compilation
      • Libraries & Linking
      • I/O
      • Files
      • Pointers
      • Dynamic Memory Allocation
      • Data Types
      • Strings Manipulation
      • Bit Manipulation
      • Pre-processors
      • Macros
      • Type Qualifiers
    • C/C++ Build Systems
      • Fundamentals for Linking
      • Symbolic Linking
      • Cross-Platform Compilation
      • CMake for Building and Linking
      • Shared Libraries
      • Dynamic Linking and Dependency Management
    • Operating Systems
      • OS & Architecture
      • Processes
      • CPU Scheduling
      • Memory Management
  • 🛩️Cyber Warfare
    • Flight Physics
    • Communication
      • PWM & PPM
      • MAVLink
  • 🏴‍☠️Offensive Security
    • Active Directory
      • Introduction
    • Web Attacks
      • Server Side
        • OS Command Injection
        • Information Disclosure
        • Directory Traversal
        • Business Logic
        • Authentication
        • File Upload
        • SSRF
      • Client Side
        • CSRF
        • XSS
    • Recon
      • Active
        • Host discovery
        • Nmap
        • Mass Scan
      • Passive
        • Metadata
      • Web Applications
        • Discovery
        • Subdomains & Directories
        • SSL Certs
        • CMS
        • WAF Detection
      • Firewall Evasion
  • Binary Exploitation
    • Stack Smashing
      • x86
      • x86_64
    • pwntools
      • Processes and Communication
      • Logging and Context
      • Cyclic
      • Packing
      • ELF
      • ROP
  • 😈Advanced Persistent Threat
    • C2
      • Sliver
    • Malware
      • Windows Internals
        • PEB
      • Academy
        • Basics
      • Sektor7
        • Essentials
  • 💌Certifications
    • AWS Certified Cloud Practitioner (CLF-C01)
      • Cloud Foundations
      • Domain 1: Cloud Concepts
      • Domain 2: Security and Compliance
      • Domain 3: Technology
      • Domain 4: Billing and Pricing
    • AWS Certified Solutions Architect - Associate (SAA-C03)
      • Foundation
    • Certified Kubernetes Administrator (CKA)
      • Core Concepts
      • Scheduling
      • Logging & Monitoring
      • Application Lifecycle Management
      • Cluster Maintenance
      • Security
      • Storage
      • Networking
      • Design Kubernetes Cluster
      • Kubernetes The Kubeadm Way
      • Troubleshooting
      • JSONPATH
      • Lightning Lab
      • Mock Exams
      • Killer Shell
    • Certified Kubernetes Security (CKS)
      • Foundation
      • Cluster Setup
      • Cluster Hardening
      • Supply Chain Security
      • Runtime Security
      • System Hardening
      • Killer Shell
    • (KGAC-101) Kong Gateway Foundations
      • Introduction to APIs and API Management
      • Introduction to Kong Gateway
      • Getting Started with Kong Enterprise
      • Getting Started with Kong Konnect
      • Introduction to Kong Plugins
  • 📜Blog Posts
    • Modern Solutions For Preventing Ransomware Attacks
Powered by GitBook
On this page
  • Symbolic Links
  • Creating Symbolic Links
  • Types of Symbolic Links
  • Following Symbolic Links
  • Key Points to Remember
  • Use Cases for Symbolic Links
  • Limitations of Symbolic Links
  1. Architecture
  2. C/C++ Build Systems

Symbolic Linking

Symbolic Links

Imagine a symbolic link as a special file that acts like a shortcut to another file or directory on your system. It doesn't contain the actual data itself, but rather stores the path to the target file or directory.

Creating Symbolic Links

On Unix-based systems, use the ln command to create symbolic links.

The basic syntax is:

ln -s target_file link_name
  • target_file: The path to the original file or directory you want to link to.

  • link_name: The name you give to the symbolic link.

Example:

ln -s /path/to/original_file my_shortcut
  • This creates a symbolic link named my_shortcut that points to the file /path/to/original_file.

Types of Symbolic Links

File Symbolic Links: These link to individual files.

Directory Symbolic Links: These link to entire directories, creating a sort of alias for the directory structure.

Following Symbolic Links

When you try to access a symbolic link, the operating system follows the link and accesses the target file or directory. This happens transparently for most operations.

Key Points to Remember

Relative vs. Absolute Paths: You can use both relative and absolute paths for the target file in a symbolic link.

Broken Links: If the target file or directory is moved or deleted, the symbolic link becomes broken, and attempting to access it will result in an error.

Permissions: Symbolic links inherit some permissions from the original file or directory, but they might also have their own permissions set.

Use Cases for Symbolic Links

Organizing Projects: Organize your development projects by creating symbolic links to frequently used libraries or header files in a central location.

Data Backups: Create symbolic links to backup directories on separate drives for easy access and organization.

Virtual File Systems: Symbolic links play a role in some virtual file systems, allowing for dynamic organization of data.

Limitations of Symbolic Links

Broken Links: As mentioned earlier, broken links can cause issues if the target is no longer available.

Performance: Following symbolic links might introduce a slight overhead compared to directly accessing files.

Cross-FileSystem Links: Symbolic links generally don't work across different file systems (e.g., linking from NTFS to ext4).

PreviousFundamentals for LinkingNextCross-Platform Compilation
👾