기호 링크 만들고 따라가기
데이터를 복사하지 않고 파일을 유연하게 구성할 수 있도록 기호 링크와 하드 링크를 만들고 검사하고 관리하는 방법을 학습해 보세요.
기호 링크 만들고 따라가기은(는) CoddyKit의 무료 Linux Command Line Mastery 강의입니다. 이것은 4개 중 4번째 강의입니다. 아래에서 전체 강의를 무료로 읽을 수 있으며, 내장 코드 에디터와 24/7 AI 튜터와 함께 브라우저에서 직접 실습할 수 있습니다. 이 강의는 Linux Command Line Mastery 학습 경로의 일부이며, 진행 상황이 웹과 CoddyKit 앱에 동기화됩니다. Linux Command Line Mastery 강의에는 총 4개의 강의가 포함되어 있습니다.
이 강의의 일부는 아직 번역되지 않았으며 영어로 표시됩니다.
What Is a Link
A link is a filesystem entry that points to another file. Links let one file appear in multiple places without duplicating its data, saving space and easing organization.
Linux has two kinds: symbolic links and hard links.
Creating a Symbolic Link
A symbolic link (symlink) is a small file holding a path to its target. Create one with ln -s: the target first, then the link name.
ln -s /var/log/app.log current.logInspecting Links
ls -l shows symlinks with an arrow pointing to their target, and the type character l at the start of the permissions.
ls -l current.log
# lrwxrwxrwx 1 user user 16 ... current.log -> /var/log/app.logFollowing a Link
Reading or writing through a symlink transparently affects the target. Editing current.log edits /var/log/app.log.
cat current.log # reads the target file's contentsHard Links
A hard link is a second name for the exact same data on disk. Both names are equal; deleting one leaves the data until the last link is gone.
ln original.txt backup.txt # no -s means hard linkSymbolic vs Hard
Key differences:
- Symlinks can cross filesystems and link directories; hard links cannot.
- A symlink breaks if its target moves; a hard link keeps the data alive.
- Symlinks store a path; hard links share an inode.
Broken Links
If a symlink's target is deleted or moved, the link becomes dangling. Accessing it fails. ls often shows broken links in red.
rm /var/log/app.log
cat current.log # error: No such file or directoryFinding the Target
Use readlink to print where a symlink points, and readlink -f to resolve the full real path through chained links.
readlink current.log
readlink -f current.logUpdating and Removing Links
To repoint a symlink, use ln -sf to force-replace it. To remove a link, rm deletes the link itself, never the target file.
ln -sf /var/log/new.log current.log # repoint
rm current.log # remove the link onlyPractical Uses
Symlinks shine for:
- A stable
currentpath pointing at the latest versioned release. - Putting config files in a dotfiles repo, linked into
$HOME. - Sharing a dataset across projects without copies.
Listing All Links in a Directory
To audit existing links, combine ls with a filter. The find command can list every symlink under a path, helping you spot broken or stray ones.
find . -type lQuick Check
Test your understanding of links.
Recap
You learned to work with links: create symlinks with ln -s, inspect them with ls -l and readlink, understand hard vs symbolic differences, recognize broken links, repoint with ln -sf, and apply them to releases, dotfiles, and shared data.
AI 튜터와 함께 Linux Command Line Mastery을(를) 배우세요 — 무료
브라우저에서 실제 코드를 작성하고 실행하며, 24/7 AI 튜터로부터 즉각적인 도움을 받고, 웹이나 앱에서 중단한 부분부터 계속 학습하세요.
- 코스
- 12
- 레슨
- 48
자주 묻는 질문
“기호 링크 만들고 따라가기” 강의는 무료인가요?
네 — “기호 링크 만들고 따라가기” 전체 내용을 이 웹사이트에서 무료로 읽을 수 있습니다. 인터랙티브하게 실습하려면(내장 코드 에디터와 24/7 AI 튜터), CoddyKit PRO로 업그레이드하면 Linux Command Line Mastery 강의 전체를 잠금 해제할 수 있습니다. Linux Command Line Mastery 강의에는 총 4개의 강의가 포함되어 있습니다.
“기호 링크 만들고 따라가기”에서 뭘 배우나요?
데이터를 복사하지 않고 파일을 유연하게 구성할 수 있도록 기호 링크와 하드 링크를 만들고 검사하고 관리하는 방법을 학습해 보세요. 브라우저에서 직접 실행하는 실습 코드로 Linux Command Line Mastery을(를) 배우며, 24/7 AI 튜터가 강의를 진행하면서 질문에 답변해줍니다.
Linux Command Line Mastery을(를) 시작하는 데 경험이 필요한가요?
사전 경험은 필요하지 않습니다. CoddyKit의 Linux Command Line Mastery은(는) 초급자부터 고급 학습자까지를 위해 구성되어 있으므로, 여기서 시작하거나 처음부터 시작할 수 있으며 자신의 속도대로 진행할 수 있습니다. 이것은 4개 중 4번째 강의입니다.
“기호 링크 만들고 따라가기” 강의는 얼마나 걸리나요?
대부분의 CoddyKit 강의는 약 5~10분이 소요됩니다. 각 강의는 간결하고 인터랙티브하여 꾸준한 진행이 가능하며, 웹과 앱에서 중단한 부분부터 바로 시작할 수 있습니다.
이 Linux Command Line Mastery 강의에서 코드를 작성하고 실행할 수 있나요?
네. 모든 Linux Command Line Mastery 강의에는 내장 코드 에디터가 포함되어 있으므로, 브라우저에서 바로 실제 코드를 작성하고 실행한 후 즉시 AI 피드백을 받을 수 있습니다 — 로컬 설정이 필요 없습니다.