Now Loading ...
-
Network: 내 방에서 구글까지, 3초만에 어떻게 서로 요청과 응답을 주고 받을까?
네트워크란 무엇인가
국제표준화기구(ISO/IEC)의 네트워크의 사전적 의미를 확인해봅시다.
하나 이상의 목적을 수행하기 위해 상호 연결된 노드(Node)들과 통신 링크(Link)들로 구성되어 데이터 통신을 가능하게 하는 독립된 체계
노드, 통신 링크 같은 어려운 말이 나오는데요. 더 쉽게 생각해보겠습니다.
먼저, 네트워크는 net + work의 합성어입니다. 네트워크를 찾아보면 그물망에 노드 즉, 여러 기기들이 걸려있는 사진을 많이 보셨을 겁니다.
통신 링크는 단순히 그물망의 선을 케이블이라고 할 수 있을 겁니다. 하지만 케이블 선을 아무리 늘린다고 해도 google의 있는 서버에 닿을 수 있을까요?
지금 컴퓨터에 연결되어 있는 인터넷(정확히는 이더넷) 케이블을 생각해봅시다. 방에 통신사 기사 아저씨를 불러서 설치한 이 케이블은 최종적으로 어디로 연결되어 있을 까요?
케이블이 없다면 휴대폰을 생각해봅시다. 휴대폰의 와이파이는 공유기 비밀번호를 입력해서 접속했을 것입니다. 그럼 공유기와 휴대폰이 연결되어 있구나 생각할 수 있겠죠. 그럼 이 공유기는 대체 뭐고 어떻게 인터넷 접속이 가능한 걸까요?
케이블 접속
컴퓨터에 꽂힌 케이블은 벽면의 RJ-45 포트로 들어갑니다. 이 선은 벽속을 타고 흘러 현관문 근처나 신발장 안에 있는 세대 단자함으로 모입니다.
세대 단자함을 나온 선은 아파트 배관을 타고 건물 지하의 메인 통신실로 내려갑니다.
이곳에는 통신사의 공유형 스위치 장비가 있습니다. 이 단계에서 수많은 케이블들이 하나의 두꺼운 광케이블로 묶이게 됩니다. 그리고 이때 전기 신호가 빛의 신호로 변환됩니다.
땅속을 통해 광케이블은 구나 시 단위로 존재하는 통신사 국사(전화국)에 도달합니다.이곳에는 거대한 코어 라우터와 NAT 장치, 그리고 사용자의 인증과 트래픽을 제어하는 인프라가 집결해 있습니다.
전화국에서 나간 패킷은 대한민국 전체를 잇는 통신망인 Backbone망에 진입하게 됩니다.
전화국을 나온 데이터는 국내외 모든 통신망과 대형 IT 기업들의 네트워크가 서로 만나는 거대한 교차로인 IX(인터넷 교환 센터)로 향합니다. 우리나라의 경우 KINX, KT 혜화/구로 국사 등이 대표적입니다. 이곳에서 트래픽이 KT망에서 SK망으로, 혹은 구글이나 넷플릭스의 전용망으로 환승하게 됩니다.
만약 접속하려는 서버가 국내(예: 네이버, 카카오)에 있다면, IX를 거쳐 가산, 판교, 춘천 등에 위치한 대규모 데이터 센터의 메인 프레임 서버 랙(Rack)에 꽂힌 랜선으로 연결됩니다.
만약 접속하려는 서버가 해외 구글 서버라면 어떻게 될까요? 물론 CDN 기술을 잘 적용해서 이럴 일은 잘 없겠지만 그렇다고 가정해봅시다.
패킷은 부산이나 거제도에 있는 해저 케이블 육양국(Landing Station)으로 이동합니다. 그곳에서 태평양 바다 깊은 곳에 깔린 태평양 횡단 광케이블을 타고 빛의 속도로 바다를 건넙니다.
그렇게 미국 육양국에 도착한 뒤, 미국의 대륙횡단망을 타고 구글의 초대형 데이터 센터 내부의 컴퓨터에 도달하게 될 것입니다.
네트워크 구분 (큰 틀)
net라고 하는 이 망은 그럼 어디서부터 어디까지를 망이라고 해야할까요?
사람들은 이 망을 거리, 권한, 연결 방식에 따라 구분해서 거시적으로 명칭을 붙여줬습니다. 이런 명칭을 붙이면 엔지니어들끼리 소통하기 편하겠죠?
거리
LAN:100m 내외 / L1, 2
WAN: 수십 km 내외, LAN 묶음 / L1, 2, 3
권한
사설망: 외부 인터넷과 분리된 망
공인망: 누구나 접속할 수 있게 공개된 망
연결 방식
유선망: 케이블로 연결
무선망: 전파로 연결
네트워크 구분 (작은 틀)
여기까지 본다면 L2의 mac 주소만 알아도 특정 기기를 지칭할 수 있는데 왜 L3의 IP를 써야 하는지 의문을 가질 수 있습니다.
mac 주소는 사람으로 치면 주민등록번호와 같습니다. 하지만 주민등록만 보고는 이 사람이 한국에 있는지 미국에 있는지 알 수 없을 겁니다.
그래서 나온게 IP입니다. 네트워크는 net+work로 노드들과 링크들로 이루어진 데이터 통신 체계라고 했습니다. 그렇다면 IP는 뭘 의미하는 걸까요?
IP의 사전적 의미를 확인해봅시다.
인터넷 프로토콜은 패킷 교환 컴퓨터 통신 네트워크가 서로 연결된 시스템에서 사용하도록 설계되었다. 이 프로토콜은 고정된 길이의 주소로 식별되는 송신지와 수신지 간에 데이터그램(Datagram)이라고 불리는 데이터 블록을 전송하는 기능을 제공한다. 또한, 필요한 경우 네트워크 전송 규격에 맞춰 긴 데이터그램을 분할(Fragmentation)하고 재조합(Reassembly)하는 기능을 제공한다.
IETF가 공식적으로 정의한 것입니다. 참고로 IP는 TCP/IP 4계층 모델을 만든 IETF기관이 정의한거라 OSI 7계층을 만든 ISO가 정의한게 아니라고 하네요.(OSI L3의 프로토콜은 IP가 아니라 사실 CLNP임)
각설하고 그래서 IP의 정의는 하나의 패킷을 여러 데이터그램으로 쪼개서 목적지로 배달하는 규칙이라고 생각하면 됩니다.
우리가 생각하는 x.x.x.x는 이 IP 즉, 프로토콜이 사용하는 여러 규칙 중 하나인 주소 규칙일 뿐입니다.
사람들이 “우리 서로 정보를 알아볼 수 있게 주소는 반드시 8비트씩 4개로 쪼개서 x.x.x.x 형태로 쓰자!”라고 한 것이죠.
이런 IP의 버전은 v4, v6가 있는데요, 원래는 ipv4로 모든 장치의 mac 주소를 매핑하기 어려워져 v6가 생겼으나 NAT 같이 하나의 공인 IP만 있어도 여러 대를 매핑해줄 수 있어서 IPv4를 많이 씁니다. 호환성 문제도 있구요. 분할 규칙, 수명 규칙 등 다양한 규칙이 있겠지만 주소 규칙이 각각 어떻게 되는지 살펴볼까요?
IPv4: 32비트 크기로, 8비트씩 4개의 그룹으로 나뉨 / . 표기
IPv6: 128비트 크기로, 16비트씩 8개의 그룹으로 나뉨 / : 표기
자, IP 주소는 하나의 mac 주소와 매핑된다고 했는데요. mac 주소를 가진 여러 기기를 링크로 묶은게 네트워크라고 했잖습니까? IP를 묶어서 표기하면 네트워크가 되지 않을까요?
그래서 나온 게 서브넷 마스크 입니다.
우리가 알고 있는 IP 주소는 사실 네트워크 주소와 호스트 주소로 이루어져 있습니다.
우리집 공유기가 220.73.145.45/24 형태의 공인 IP 주소라고 칩시다. 앞의 220.73.145 24비트가 네트워크 주소가 됩니다. WAN 선을 통해 통신사 기지국의 DHCP 서버로 요청을 보내면 그 근처 네트워크 220.73.145.x 중 하나를 할당받게 되는 거죠. 실제로 220.73.145.x를 사용하는 공유기들은 지리적으로 가까운 위치에 존재할 겁니다.
서브넷 관련해서 실제로 어떻게 서브넷팅하는지 한 가지 예시를 들어보죠. aws 에서 사용할 수 있는 우리회사의 VPC 주소는 192.168.1.0/24 라고 가정해봅시다. 그런데 4개의 서브넷이 필요하고 각 서브넷에는 20개의 IP주소가 필요할 때 조건을 만족하는 4개의 주소는 무엇일까요?
먼저 알아둬야 할 것은 AWS는 각 서브넷마다 5개의 IP 주소를 예약(기본 네트워크 주소, VPC 라우터, DNS 서버, AWS 예비, 네트워크 브로드캐스트 주소)한다는 것입니다.
그럼 각 서브넷 마다 20+5 총 25개의 IP 주소가 필요할 거고 2의 5승이 가장 가깝게 25를 포함한다는 것을 알 수 있습니다. 따라서 32개의 IP 주소씩 끊어서 할당 받도록 하면 되겠네요.
그럼 총 32비트의 IP 주소에서 5를 뺀 27비트를 네트워크로 고정하면 된다는 것을 알 수 있습니다. 따라서 192.168.1.0/27, 192.168.1.32/27, 192.168.1.64/27, 192.168.1.96/27 이렇게 서브넷을 구성하면 되겠네요.
다음에는 스위치와 같은 장치가 무엇인지, 그리고 어떻게 내 패킷이 목적지 IP 주소로 보내지는 지에 대해 적어보도록 하겠습니다. ᕕ( ᐛ )ᕗ
-
-
Manage blog comments with Giscus
Giscus is a free comments system powered without your own database. Giscus uses the Github Discussions to store and load associated comments based on a chosen mapping (URL, pathname, title, etc.).
To comment, visitors must authorize the giscus app to post on their behalf using the GitHub OAuth flow. Alternatively, visitors can comment on the GitHub Discussion directly. You can moderate the comments on GitHub.
Prerequisites
Create a github repo
You need a GitHub repository first. If you gonna use GitHub Pages for hosting your website, you can choose the corresponding repository (i.e., [userID].github.io)
The repository should be public, otherwise visitors will not be able to view the discussion.
Turn on Discussion feature
In your GitHub repository Settings, make sure that General > Features > Discussions feature is enabled.
Activate Giscus API
Follow the steps in Configuration guide. Make sure the verification of your repository is successful.
Then, scroll down from the manual page and choose the Discussion Category options. You don’t need to touch other configs.
Copy _config.yml
Now, you get the giscus script. Copy the four properties marked with a red box as shown below:
Paste those values to _config.yml placed in the root directory.
# External API
giscus_repo: "[ENTER REPO HERE]"
giscus_repoId: "[ENTER REPO ID HERE]"
giscus_category: "[ENTER CATEGORY NAME HERE]"
giscus_categoryId: "[ENTER CATEGORY ID HERE]"
None
· 2024-02-03
-
-
Classic Literature #2: Don Quixote
About the book
Author: Miguel de Cervantes
Original title: El ingenioso hidalgo don Quixote de la Mancha
Country: Spain
Genre: Novel
Publication date:
1605 (Part One)
1615 (Part Two)
Chapter I.
In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing. An olla of rather more beef than mutton, a salad on most nights, scraps on Saturdays, lentils on Fridays, and a pigeon or so extra on Sundays, made away with three-quarters of his income. The rest of it went in a doublet of fine cloth and velvet breeches and shoes to match for holidays, while on week-days he made a brave figure in his best homespun. He had in his house a housekeeper past forty, a niece under twenty, and a lad for the field and market-place, who used to saddle the hack as well as handle the bill-hook. The age of this gentleman of ours was bordering on fifty; he was of a hardy habit, spare, gaunt-featured, a very early riser and a great sportsman. They will have it his surname was Quixada or Quesada (for here there is some difference of opinion among the authors who write on the subject), although from reasonable conjectures it seems plain that he was called Quexana. This, however, is of but little importance to our tale; it will be enough not to stray a hair’s breadth from the truth in the telling of it.
You must know, then, that the above-named gentleman whenever he was at leisure (which was mostly all the year round) gave himself up to reading books of chivalry with such ardour and avidity that he almost entirely neglected the pursuit of his field-sports, and even the management of his property; and to such a pitch did his eagerness and infatuation go that he sold many an acre of tillageland to buy books of chivalry to read, and brought home as many of them as he could get. But of all there were none he liked so well as those of the famous Feliciano de Silva’s composition, for their lucidity of style and complicated conceits were as pearls in his sight, particularly when in his reading he came upon courtships and cartels, where he often found passages like “the reason of the unreason with which my reason is afflicted so weakens my reason that with reason I murmur at your beauty;” or again, “the high heavens, that of your divinity divinely fortify you with the stars, render you deserving of the desert your greatness deserves.” Over conceits of this sort the poor gentleman lost his wits, and used to lie awake striving to understand them and worm the meaning out of them; what Aristotle himself could not have made out or extracted had he come to life again for that special purpose. He was not at all easy about the wounds which Don Belianis gave and took, because it seemed to him that, great as were the surgeons who had cured him, he must have had his face and body covered all over with seams and scars. He commended, however, the author’s way of ending his book with the promise of that interminable adventure, and many a time was he tempted to take up his pen and finish it properly as is there proposed, which no doubt he would have done, and made a successful piece of work of it too, had not greater and more absorbing thoughts prevented him.
Many an argument did he have with the curate of his village (a learned man, and a graduate of Siguenza) as to which had been the better knight, Palmerin of England or Amadis of Gaul. Master Nicholas, the village barber, however, used to say that neither of them came up to the Knight of Phoebus, and that if there was any that could compare with him it was Don Galaor, the brother of Amadis of Gaul, because he had a spirit that was equal to every occasion, and was no finikin knight, nor lachrymose like his brother, while in the matter of valour he was not a whit behind him. In short, he became so absorbed in his books that he spent his nights from sunset to sunrise, and his days from dawn to dark, poring over them; and what with little sleep and much reading his brains got so dry that he lost his wits. His fancy grew full of what he used to read about in his books, enchantments, quarrels, battles, challenges, wounds, wooings, loves, agonies, and all sorts of impossible nonsense; and it so possessed his mind that the whole fabric of invention and fancy he read of was true, that to him no history in the world had more reality in it. He used to say the Cid Ruy Diaz was a very good knight, but that he was not to be compared with the Knight of the Burning Sword who with one back-stroke cut in half two fierce and monstrous giants. He thought more of Bernardo del Carpio because at Roncesvalles he slew Roland in spite of enchantments, availing himself of the artifice of Hercules when he strangled Antaeus the son of Terra in his arms. He approved highly of the giant Morgante, because, although of the giant breed which is always arrogant and ill-conditioned, he alone was affable and well-bred. But above all he admired Reinaldos of Montalban, especially when he saw him sallying forth from his castle and robbing everyone he met, and when beyond the seas he stole that image of Mahomet which, as his history says, was entirely of gold. To have a bout of kicking at that traitor of a Ganelon he would have given his housekeeper, and his niece into the bargain.
In short, his wits being quite gone, he hit upon the strangest notion that ever madman in this world hit upon, and that was that he fancied it was right and requisite, as well for the support of his own honour as for the service of his country, that he should make a knight-errant of himself, roaming the world over in full armour and on horseback in quest of adventures, and putting in practice himself all that he had read of as being the usual practices of knights-errant; righting every kind of wrong, and exposing himself to peril and danger from which, in the issue, he was to reap eternal renown and fame. Already the poor man saw himself crowned by the might of his arm Emperor of Trebizond at least; and so, led away by the intense enjoyment he found in these pleasant fancies, he set himself forthwith to put his scheme into execution.
The first thing he did was to clean up some armour that had belonged to his great-grandfather, and had been for ages lying forgotten in a corner eaten with rust and covered with mildew. He scoured and polished it as best he could, but he perceived one great defect in it, that it had no closed helmet, nothing but a simple morion. This deficiency, however, his ingenuity supplied, for he contrived a kind of half-helmet of pasteboard which, fitted on to the morion, looked like a whole one. It is true that, in order to see if it was strong and fit to stand a cut, he drew his sword and gave it a couple of slashes, the first of which undid in an instant what had taken him a week to do. The ease with which he had knocked it to pieces disconcerted him somewhat, and to guard against that danger he set to work again, fixing bars of iron on the inside until he was satisfied with its strength; and then, not caring to try any more experiments with it, he passed it and adopted it as a helmet of the most perfect construction.
He next proceeded to inspect his hack, which, with more quartos than a real and more blemishes than the steed of Gonela, that “tantum pellis et ossa fuit,” surpassed in his eyes the Bucephalus of Alexander or the Babieca of the Cid. Four days were spent in thinking what name to give him, because (as he said to himself) it was not right that a horse belonging to a knight so famous, and one with such merits of his own, should be without some distinctive name, and he strove to adapt it so as to indicate what he had been before belonging to a knight-errant, and what he then was; for it was only reasonable that, his master taking a new character, he should take a new name, and that it should be a distinguished and full-sounding one, befitting the new order and calling he was about to follow. And so, after having composed, struck out, rejected, added to, unmade, and remade a multitude of names out of his memory and fancy, he decided upon calling him Rocinante, a name, to his thinking, lofty, sonorous, and significant of his condition as a hack before he became what he now was, the first and foremost of all the hacks in the world.
Having got a name for his horse so much to his taste, he was anxious to get one for himself, and he was eight days more pondering over this point, till at last he made up his mind to call himself “Don Quixote,” whence, as has been already said, the authors of this veracious history have inferred that his name must have been beyond a doubt Quixada, and not Quesada as others would have it. Recollecting, however, that the valiant Amadis was not content to call himself curtly Amadis and nothing more, but added the name of his kingdom and country to make it famous, and called himself Amadis of Gaul, he, like a good knight, resolved to add on the name of his, and to style himself Don Quixote of La Mancha, whereby, he considered, he described accurately his origin and country, and did honour to it in taking his surname from it.
So then, his armour being furbished, his morion turned into a helmet, his hack christened, and he himself confirmed, he came to the conclusion that nothing more was needed now but to look out for a lady to be in love with; for a knight-errant without love was like a tree without leaves or fruit, or a body without a soul. As he said to himself, “If, for my sins, or by my good fortune, I come across some giant hereabouts, a common occurrence with knights-errant, and overthrow him in one onslaught, or cleave him asunder to the waist, or, in short, vanquish and subdue him, will it not be well to have some one I may send him to as a present, that he may come in and fall on his knees before my sweet lady, and in a humble, submissive voice say, ‘I am the giant Caraculiambro, lord of the island of Malindrania, vanquished in single combat by the never sufficiently extolled knight Don Quixote of La Mancha, who has commanded me to present myself before your Grace, that your Highness dispose of me at your pleasure’?” Oh, how our good gentleman enjoyed the delivery of this speech, especially when he had thought of some one to call his Lady! There was, so the story goes, in a village near his own a very good-looking farm-girl with whom he had been at one time in love, though, so far as is known, she never knew it nor gave a thought to the matter. Her name was Aldonza Lorenzo, and upon her he thought fit to confer the title of Lady of his Thoughts; and after some search for a name which should not be out of harmony with her own, and should suggest and indicate that of a princess and great lady, he decided upon calling her Dulcinea del Toboso—she being of El Toboso—a name, to his mind, musical, uncommon, and significant, like all those he had already bestowed upon himself and the things belonging to him.
-
Classic Literature #1: Romeo and Juliet
About the book
Author: William Shakespeare
Country: England
Genre: Shakespearean tragedy
Publication date: 1597
Synopsis
The prologue of Romeo and Juliet calls the title characters “star-crossed lovers”—and the stars do seem to conspire against these young lovers.
Romeo is a Montague, and Juliet a Capulet. Their families are enmeshed in a feud, but the moment they meet—when Romeo and his friends attend a party at Juliet’s house in disguise—the two fall in love and quickly decide that they want to be married.
A friar secretly marries them, hoping to end the feud. Romeo and his companions almost immediately encounter Juliet’s cousin Tybalt, who challenges Romeo. When Romeo refuses to fight, Romeo’s friend Mercutio accepts the challenge and is killed. Romeo then kills Tybalt and is banished. He spends that night with Juliet and then leaves for Mantua.
Juliet’s father forces her into a marriage with Count Paris. To avoid this marriage, Juliet takes a potion, given her by the friar, that makes her appear dead. The friar will send Romeo word to be at her family tomb when she awakes. The plan goes awry, and Romeo learns instead that she is dead. In the tomb, Romeo kills himself. Juliet wakes, sees his body, and commits suicide. Their deaths appear finally to end the feud.
-
My personal Online Library
What is Lorem Ipsum?
This is an example post ‘<’. Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
Why do we use it?
It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using ‘Content here, content here’, making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for ‘lorem ipsum’ will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).
Where does it come from?
Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of “de Finibus Bonorum et Malorum” (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, “Lorem ipsum dolor sit amet..”, comes from a line in section 1.10.32.
The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from “de Finibus Bonorum et Malorum” by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.
Where can I get some?
There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don’t look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn’t anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.
-
-
-
Markdown from A to Z
Headings
To create a heading, add number signs (#) in front of a word or phrase. The number of number signs you use should correspond to the heading level. For example, to create a heading level three (<h3>), use three number signs (e.g., ### My Header).
Markdown
HTML
Rendered Output
# Header 1
<h1>Header 1</h1>
Header 1
## Header 2
<h2>Header 2</h2>
Header 2
### Header 3
<h3>Header 3</h3>
Header 3
Emphasis
You can add emphasis by making text bold or italic.
Bold
To bold text, add two asterisks (e.g., **text** = text) or underscores before and after a word or phrase. To bold the middle of a word for emphasis, add two asterisks without spaces around the letters.
Italic
To italicize text, add one asterisk (e.g., *text* = text) or underscore before and after a word or phrase. To italicize the middle of a word for emphasis, add one asterisk without spaces around the letters.
Blockquotes
To create a blockquote, add a > in front of a paragraph.
> Yongha Kim is the best developer in the world.
>
> Factos 👍👀
Yongha Kim is the best developer in the world.
Factos 👍👀
Lists
You can organize items into ordered and unordered lists.
Ordered Lists
To create an ordered list, add line items with numbers followed by periods. The numbers don’t have to be in numerical order, but the list should start with the number one.
1. First item
2. Second item
3. Third item
4. Fourth item
First item
Second item
Third item
Fourth item
Unordered Lists
To create an unordered list, add dashes (-), asterisks (*), or plus signs (+) in front of line items. Indent one or more items to create a nested list.
* First item
* Second item
* Third item
* Fourth item
First item
Second item
Third item
Fourth item
Code
To denote a word or phrase as code, enclose it in backticks (`).
Markdown
HTML
Rendered Output
At the command prompt, type `nano`.
At the command prompt, type <code>nano</code>.
At the command prompt, type nano.
Escaping Backticks
If the word or phrase you want to denote as code includes one or more backticks, you can escape it by enclosing the word or phrase in double backticks (``).
Markdown
HTML
Rendered Output
``Use `code` in your Markdown file.``
<code>Use `code` in your Markdown file.</code>
Use `code` in your Markdown file.
Code Blocks
To create code blocks that spans multiple lines of code, set the text inside three or more backquotes ( ``` ) or tildes ( ~~~ ).
<html>
<head>
</head>
</html>
def foo():
a = 1
for i in [1,2,3]:
a += i
Horizontal Rules
To create a horizontal rule, use three or more asterisks (***), dashes (---), or underscores (___) on a line by themselves.
***
---
_________________
Links
To create a link, enclose the link text in brackets (e.g., [Blue Archive]) and then follow it immediately with the URL in parentheses (e.g., (https://bluearchive.nexon.com)).
My favorite mobile game is [Blue Archive](https://bluearchive.nexon.com).
The rendered output looks like this:
My favorite mobile game is Blue Archive.
Adding Titles
You can optionally add a title for a link. This will appear as a tooltip when the user hovers over the link. To add a title, enclose it in quotation marks after the URL.
My favorite mobile game is [Blue Archive](https://bluearchive.nexon.com "All senseis are welcome!").
The rendered output looks like this:
My favorite mobile game is Blue Archive.
URLs and Email Addresses
To quickly turn a URL or email address into a link, enclose it in angle brackets.
<https://www.youtube.com/>
<fake@example.com>
The rendered output looks like this:
https://www.youtube.com/
fake@example.com
Images
To add an image, add an exclamation mark (!), followed by alt text in brackets, and the path or URL to the image asset in parentheses. You can optionally add a title in quotation marks after the path or URL.

The rendered output looks like this:
Linking Images
To add a link to an image, enclose the Markdown for the image in brackets, and then add the link in parentheses.
[](https://www.britannica.com/place/La-Mancha)
The rendered output looks like this:
Escaping Characters
To display a literal character that would otherwise be used to format text in a Markdown document, add a backslash (\) in front of the character.
\* Without the backslash, this would be a bullet in an unordered list.
The rendered output looks like this:
* Without the backslash, this would be a bullet in an unordered list.
Characters You Can Escape
You can use a backslash to escape the following characters.
Character
Name
`
backtick
*
asterisk
_
underscore
{}
curly braces
[]
brackets
<>
angle brackets
()
parentheses
#
pound sign
+
plus sign
-
minus sign (hyphen)
.
dot
!
exclamation mark
|
pipe
HTML
Many Markdown applications allow you to use HTML tags in Markdown-formatted text. This is helpful if you prefer certain HTML tags to Markdown syntax. For example, some people find it easier to use HTML tags for images. Using HTML is also helpful when you need to change the attributes of an element, like specifying the color of text or changing the width of an image.
To use HTML, place the tags in the text of your Markdown-formatted file.
This **word** is bold. This <span style="font-style: italic;">word</span> is italic.
The rendered output looks like this:
This word is bold. This word is italic.
None
· 2023-09-05
Touch background to close