{"id":59106,"date":"2023-09-11T15:01:28","date_gmt":"2023-09-11T07:01:28","guid":{"rendered":"https:\/\/www.hongkiat.com\/blog\/?p=59106"},"modified":"2023-09-12T17:15:07","modified_gmt":"2023-09-12T09:15:07","slug":"linux-command-history","status":"publish","type":"post","link":"https:\/\/www.hongkiat.com\/blog\/linux-command-history\/","title":{"rendered":"How to Use History Command in Linux"},"content":{"rendered":"<p>The <code>history<\/code> Linux command is a handy tool that displays a list of all the commands that a user has previously executed in the terminal. This list is stored in a history file, and by using the history command, you can view this file, making it easier to recall and reuse past commands.<\/p>\n<p>This command is commonly used to track actions performed in the terminal, especially when troubleshooting or repeating complex command sequences. It can save time and effort by allowing users to quickly recall and rerun previous commands without having to type them out again. Some users also utilize the history to audit or review actions taken in the system, aiding in system administration and security.<\/p>\n<p>General syntax for <code>history<\/code> command:<\/p>\n<pre>\r\nhistory [OPTIONS...]\r\n<\/pre>\n<hr>\n<h3>1. Show used commands<\/h3>\n<pre>history [number]<\/pre>\n<p>This command displays a limited number of previously executed commands.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<p>The <code>history 5<\/code> command in Linux will display the last 5 commands that were executed in the terminal. Here\u2019s a sample output:<\/p>\n<pre>  501  git status\r\n  502  cd \/var\/www\/html\r\n  503  ls -la\r\n  504  nano myfile.txt\r\n  505  history 5\r\n<\/pre>\n<p>Each line shows a command from the history, preceded by a unique number that represents the command\u2019s position in the history file. In this example, the last five commands that were run are shown, including the <code>history 5<\/code> command itself.<\/p>\n<hr>\n<h3>2. Delete commands from history list<\/h3>\n<pre>history -d [number]<\/pre>\n<p>Use the <code>-d<\/code> option to delete commands from the history list.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<p>Before deleting:<\/p>\n<pre>1  ls\r\n2  cd Documents\/\r\n3  touch file.txt\r\n4  nano file.txt\r\n5  rm file.txt\r\n6  history<\/pre>\n<p>After running <code>history -d 5<\/code>:<\/p>\n<pre>1  ls\r\n2  cd Documents\/\r\n3  touch file.txt\r\n4  nano file.txt\r\n5  history\r\n<\/pre>\n<p>As you can see, the 5th command (<code>rm file.txt<\/code>) has been removed from the history.<\/p>\n<hr>\n<h3>3. Search used command within history<\/h3>\n<pre>history | grep [text]<\/pre>\n<p>The <code>history | grep<\/code> command helps you find commands that match a text pattern.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<p>The <code>history | grep cat<\/code> command in Linux will search through your command history and display all the lines that contain the word \u201ccat.\u201d The grep command filters the output of the history command to only show lines with the specified pattern, in this case, \u201ccat.\u201d Here\u2019s a sample output:<\/p>\n<pre>  42  cat file.txt\r\n  73  cat \/etc\/passwd\r\n 100  cat documents\/note.txt | more\r\n 123  concatenate file1.txt file2.txt > combined.txt\r\n 150  cat logs\/error.log | grep \"ERROR\"\r\n<\/pre>\n<p>In this example, each line begins with a number representing the command\u2019s position in the history, followed by the command itself. It includes every instance where \u201ccat\u201d appears, whether it\u2019s the <code>cat<\/code> command itself or just part of another word or command.<\/p>\n<hr>\n<h3>4. Clearing the history list<\/h3>\n<pre>history -c<\/pre>\n<p>The <code>-c (clear)<\/code> option is used to clear all commands from the history list.<\/p>\n<hr>\n<h3>5. Execute the command with event number<\/h3>\n<pre>!number<\/pre>\n<p>This command allows you to execute commands with an event number from the history list. There is no need to write a complete command.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<p>Suppose the 10th command in your history was <code>ls -l<\/code>, which lists files in the current directory in long format. If you run <code>!10<\/code>, the output might look something like this:<\/p>\n<pre>total 24\r\ndrwxr-xr-x 5 user user 4096 Aug  6 10:00 Documents\r\ndrwxr-xr-x 2 user user 4096 Aug  6 09:45 Downloads\r\ndrwxr-xr-x 2 user user 4096 Aug  6 09:45 Music\r\ndrwxr-xr-x 2 user user 4096 Aug  6 09:45 Pictures\r\n<\/pre>\n<p>This output shows the contents of the current directory, just as if you had run the <code>ls -l<\/code> command directly.<\/p>\n<hr>\n<h3>6. Write changes to bash_history file<\/h3>\n<pre>history -w [filename]<\/pre>\n<p>Use this option to write all changes made in the current session to the <code>bash_history<\/code> file.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<p>The <code>history -w file.txt<\/code> command in Linux doesn\u2019t produce output in the terminal itself. Instead, it writes the current history of commands to a file named <code>file.txt<\/code>.<\/p>\n<p>So, if you were to open <code>file.txt<\/code>, you might see something like this:<\/p>\n<pre>1 cd \/home\/user\/documents\r\n2 ls -la\r\n3 sudo apt-get update\r\n4 nano file.txt\r\n5 history -w file.txt\r\n<\/pre>\n<p>This file now contains the list of commands that were previously executed in the terminal, and you can view or edit it using any text editor.<\/p>\n<h3 style=\"padding-bottom:10px\">More Linux commands:<\/h3>\n<table>\n<tbody>\n<tr>\n<td width=\"150\">Directory Operations<\/td>\n<td><a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-rm-rmdir\/\"><code>rmdir<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-cd\/\"><code>cd<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-pwd\/\"><code>pwd<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-exa\/\"><code>exa<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-ls\/\"><code>ls<\/code><\/a><\/td>\n<\/tr>\n<tr>\n<td width=\"150\">File Operations<\/td>\n<td><a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-cat\/\"><code>cat<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-cp\/\"><code>cp<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-dd\/\"><code>dd<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-less\/\"><code>less<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-touch\/\"><code>touch<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-ln\/\"><code>ln<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-rename\/\"><code>rename<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-more\/\"><code>more<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-head\/\"><code>head<\/code><\/a><\/td>\n<\/tr>\n<tr>\n<td width=\"150\">File System Operations<\/td>\n<td><a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-chown\/\"><code>chown<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-mkfs\/\"><code>mkfs<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-locate\/\"><code>locate<\/code><\/a><\/td>\n<\/tr>\n<tr>\n<td width=\"150\">Networking<\/td>\n<td><a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-ping\/\"><code>ping<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-curl\/\"><code>curl<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-wget\/\"><code>wget<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-iptables\/\"><code>iptables<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-mtr\/\"><code>mtr<\/code><\/a><\/td>\n<\/tr>\n<tr>\n<td width=\"150\">Search and Text Processing<\/td>\n<td><a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-find\/\"><code>find<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-grep\/\"><code>grep<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-sed\/\"><code>sed<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-whatis\/\"><code>whatis<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-ripgrep\/\"><code>ripgrep<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-fd\/\"><code>fd<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-tldr\/\"><code>tldr<\/code><\/a><\/td>\n<\/tr>\n<tr>\n<td width=\"150\">System Information and Management<\/td>\n<td><a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-env\/\"><code>env<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-history\/\"><code>history<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-top\/\"><code>top<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-who\/\"><code>who<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-htop\/\"><code>htop<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-glances\/\"><code>glances<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-lsof\/\"><code>lsof<\/code><\/a><\/td>\n<\/tr>\n<tr>\n<td width=\"150\">User and Session Management<\/td>\n<td><a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-screen\/\"><code>screen<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-su\/\"><code>su<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-sudo\/\"><code>sudo<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-open\/\"><code>open<\/code><\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>","protected":false},"excerpt":{"rendered":"<p>Learn and master Linux&#8217;s history command to track and manage your terminal activities.<\/p>\n","protected":false},"author":9,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3397],"tags":[888,3316],"topic":[],"class_list":["entry-content","is-maxi"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v22.8 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Use History Command in Linux - Hongkiat<\/title>\n<meta name=\"description\" content=\"Learn and master Linux&#039;s history command to track and manage your terminal activities.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-history\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Use History Command in Linux\" \/>\n<meta property=\"og:description\" content=\"Learn and master Linux&#039;s history command to track and manage your terminal activities.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.hongkiat.com\/blog\/linux-command-history\/\" \/>\n<meta property=\"og:site_name\" content=\"Hongkiat\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/hongkiatcom\" \/>\n<meta property=\"article:published_time\" content=\"2023-09-11T07:01:28+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-09-12T09:15:07+00:00\" \/>\n<meta name=\"author\" content=\"Hongkiat.com\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@hongkiat\" \/>\n<meta name=\"twitter:site\" content=\"@hongkiat\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Hongkiat.com\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/linux-command-history\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/linux-command-history\\\/\"},\"author\":{\"name\":\"Hongkiat.com\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/7cc686597d92f9086729e4bcc1577ba3\"},\"headline\":\"How to Use History Command in Linux\",\"datePublished\":\"2023-09-11T07:01:28+00:00\",\"dateModified\":\"2023-09-12T09:15:07+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/linux-command-history\\\/\"},\"wordCount\":515,\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"keywords\":[\"Linux\",\"Linux Commands\"],\"articleSection\":[\"Desktop\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/linux-command-history\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/linux-command-history\\\/\",\"name\":\"How to Use History Command in Linux - Hongkiat\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\"},\"datePublished\":\"2023-09-11T07:01:28+00:00\",\"dateModified\":\"2023-09-12T09:15:07+00:00\",\"description\":\"Learn and master Linux's history command to track and manage your terminal activities.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/linux-command-history\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/linux-command-history\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/linux-command-history\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Use History Command in Linux\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"name\":\"Hongkiat\",\"description\":\"Tech and Design Tips\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\",\"name\":\"Hongkiat.com\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"contentUrl\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"width\":1200,\"height\":799,\"caption\":\"Hongkiat.com\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/hongkiatcom\",\"https:\\\/\\\/x.com\\\/hongkiat\",\"https:\\\/\\\/www.pinterest.com\\\/hongkiat\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/7cc686597d92f9086729e4bcc1577ba3\",\"name\":\"Hongkiat.com\",\"description\":\"This post is published by an HKDC (hongkiat.com) staff. (I.e., intern, staff writer, or editor).\",\"sameAs\":[\"https:\\\/\\\/www.hongkiat.com\"],\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/author\\\/com\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Use History Command in Linux - Hongkiat","description":"Learn and master Linux's history command to track and manage your terminal activities.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.hongkiat.com\/blog\/linux-command-history\/","og_locale":"en_US","og_type":"article","og_title":"How to Use History Command in Linux","og_description":"Learn and master Linux's history command to track and manage your terminal activities.","og_url":"https:\/\/www.hongkiat.com\/blog\/linux-command-history\/","og_site_name":"Hongkiat","article_publisher":"https:\/\/www.facebook.com\/hongkiatcom","article_published_time":"2023-09-11T07:01:28+00:00","article_modified_time":"2023-09-12T09:15:07+00:00","author":"Hongkiat.com","twitter_card":"summary_large_image","twitter_creator":"@hongkiat","twitter_site":"@hongkiat","twitter_misc":{"Written by":"Hongkiat.com","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.hongkiat.com\/blog\/linux-command-history\/#article","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/linux-command-history\/"},"author":{"name":"Hongkiat.com","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/7cc686597d92f9086729e4bcc1577ba3"},"headline":"How to Use History Command in Linux","datePublished":"2023-09-11T07:01:28+00:00","dateModified":"2023-09-12T09:15:07+00:00","mainEntityOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/linux-command-history\/"},"wordCount":515,"publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"keywords":["Linux","Linux Commands"],"articleSection":["Desktop"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.hongkiat.com\/blog\/linux-command-history\/","url":"https:\/\/www.hongkiat.com\/blog\/linux-command-history\/","name":"How to Use History Command in Linux - Hongkiat","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/#website"},"datePublished":"2023-09-11T07:01:28+00:00","dateModified":"2023-09-12T09:15:07+00:00","description":"Learn and master Linux's history command to track and manage your terminal activities.","breadcrumb":{"@id":"https:\/\/www.hongkiat.com\/blog\/linux-command-history\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.hongkiat.com\/blog\/linux-command-history\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.hongkiat.com\/blog\/linux-command-history\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.hongkiat.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Use History Command in Linux"}]},{"@type":"WebSite","@id":"https:\/\/www.hongkiat.com\/blog\/#website","url":"https:\/\/www.hongkiat.com\/blog\/","name":"Hongkiat","description":"Tech and Design Tips","publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.hongkiat.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.hongkiat.com\/blog\/#organization","name":"Hongkiat.com","url":"https:\/\/www.hongkiat.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","contentUrl":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","width":1200,"height":799,"caption":"Hongkiat.com"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/hongkiatcom","https:\/\/x.com\/hongkiat","https:\/\/www.pinterest.com\/hongkiat\/"]},{"@type":"Person","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/7cc686597d92f9086729e4bcc1577ba3","name":"Hongkiat.com","description":"This post is published by an HKDC (hongkiat.com) staff. (I.e., intern, staff writer, or editor).","sameAs":["https:\/\/www.hongkiat.com"],"url":"https:\/\/www.hongkiat.com\/blog\/author\/com\/"}]}},"jetpack_featured_media_url":"https:\/\/","jetpack_shortlink":"https:\/\/wp.me\/p4uxU-fnk","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/59106","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/comments?post=59106"}],"version-history":[{"count":4,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/59106\/revisions"}],"predecessor-version":[{"id":69238,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/59106\/revisions\/69238"}],"wp:attachment":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/media?parent=59106"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/categories?post=59106"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/tags?post=59106"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/topic?post=59106"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}