{"id":87024,"date":"2025-05-17T22:09:01","date_gmt":"2025-05-17T15:09:01","guid":{"rendered":"https:\/\/itviec1.uptech.vn\/?p=87024"},"modified":"2025-05-17T22:09:01","modified_gmt":"2025-05-17T15:09:01","slug":"cach-su-dung-bash-shell-tren-linux","status":"publish","type":"post","link":"https:\/\/itviec.com\/blog\/cach-su-dung-bash-shell-tren-linux\/","title":{"rendered":"C\u00e1ch s\u1eed d\u1ee5ng Bash shell tr\u00ean Linux: T\u1eeb ch\u1ea1y l\u1ec7nh \u0111\u1ebfn t\u00f9y ch\u1ec9nh"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_84 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">N\u1ed9i dung b\u00e0i vi\u1ebft<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/itviec.com\/blog\/cach-su-dung-bash-shell-tren-linux\/#Tong_quan_ve_bash_shell_trong_Linux\" >T\u1ed5ng quan v\u1ec1 bash shell trong Linux<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/itviec.com\/blog\/cach-su-dung-bash-shell-tren-linux\/#Vi_sao_Bash_la_shell_pho_bien_nhat_tren_Linux\" >V\u00ec sao Bash l\u00e0 shell ph\u1ed5 bi\u1ebfn nh\u1ea5t tr\u00ean Linux?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/itviec.com\/blog\/cach-su-dung-bash-shell-tren-linux\/#Cach_chay_Bash_Shell_tren_Linux\" >C\u00e1ch ch\u1ea1y Bash Shell tr\u00ean Linux<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/itviec.com\/blog\/cach-su-dung-bash-shell-tren-linux\/#Tong_hop_cac_lenh_Bash_shell_linux_co_ban\" >T\u1ed5ng h\u1ee3p c\u00e1c l\u1ec7nh Bash shell linux c\u01a1 b\u1ea3n<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/itviec.com\/blog\/cach-su-dung-bash-shell-tren-linux\/#Cac_cau_hinh_tuy_chinh_cho_Bash\" >C\u00e1c c\u1ea5u h\u00ecnh t\u00f9y ch\u1ec9nh cho Bash<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/itviec.com\/blog\/cach-su-dung-bash-shell-tren-linux\/#Cac_cau_hoi_thuong_gap_ve_cach_chay_Bash_shell_tren_Linux\" >C\u00e1c c\u00e2u h\u1ecfi th\u01b0\u1eddng g\u1eb7p v\u1ec1 c\u00e1ch ch\u1ea1y Bash shell tr\u00ean Linux<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/itviec.com\/blog\/cach-su-dung-bash-shell-tren-linux\/#Tong_ket\" >T\u1ed5ng k\u1ebft<\/a><\/li><\/ul><\/nav><\/div>\n<p><em><strong>N\u1ebfu b\u1ea1n \u0111ang l\u00e0m vi\u1ec7c tr\u00ean h\u1ec7 \u0111i\u1ec1u h\u00e0nh Linux, Bash shell l\u00e0 m\u1ed9t c\u00f4ng c\u1ee5 kh\u00f4ng th\u1ec3 thi\u1ebfu. V\u1edbi kh\u1ea3 n\u0103ng th\u1ef1c hi\u1ec7n c\u00e1c l\u1ec7nh \u0111\u01a1n gi\u1ea3n \u0111\u1ebfn ph\u1ee9c t\u1ea1p v\u00e0 h\u1ed7 tr\u1ee3 t\u1ea1o c\u00e1c script t\u1ef1 \u0111\u1ed9ng h\u00f3a c\u00f4ng vi\u1ec7c, Bash mang l\u1ea1i nhi\u1ec1u l\u1ee3i \u00edch cho ng\u01b0\u1eddi d\u00f9ng trong vi\u1ec7c t\u1ed1i \u01b0u h\u00f3a quy tr\u00ecnh l\u00e0m vi\u1ec7c.<\/strong><\/em><\/p>\n<p><span style=\"font-weight: 400;\">\u0110\u1ecdc b\u00e0i vi\u1ebft n\u00e0y \u0111\u1ec3 hi\u1ec3u r\u00f5 h\u01a1n v\u1ec1:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">T\u1ed5ng quan v\u1ec1 bash shell trong Linux<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">C\u00e1ch ch\u1ea1y bash shell tr\u00ean Linux<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">C\u00e1c l\u1ec7nh bash shell linux c\u01a1 b\u1ea3n<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">M\u1ed9t s\u1ed1 c\u1ea5u h\u00ecnh t\u00f9y ch\u1ec9nh bash prompt<\/span><\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Tong_quan_ve_bash_shell_trong_Linux\"><\/span><b>T\u1ed5ng quan v\u1ec1 bash shell trong Linux<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><b>Shell<\/b><span style=\"font-weight: 400;\"> l\u00e0 m\u1ed9t ch\u01b0\u01a1ng tr\u00ecnh \u0111i\u1ec1u khi\u1ec3n d\u00f2ng l\u1ec7nh, \u0111\u00f3ng vai tr\u00f2 nh\u01b0 m\u1ed9t giao di\u1ec7n gi\u1eefa ng\u01b0\u1eddi d\u00f9ng v\u00e0 h\u1ec7 \u0111i\u1ec1u h\u00e0nh. T\u00ean g\u1ecdi &#8220;shell&#8221; \u0111\u01b0\u1ee3c b\u1eaft ngu\u1ed3n t\u1eeb vi\u1ec7c n\u00f3 l\u00e0 l\u1edbp b\u00ean ngo\u00e0i, bao b\u1ecdc xung quanh h\u1ec7 \u0111i\u1ec1u h\u00e0nh. Th\u00f4ng qua shell, ng\u01b0\u1eddi d\u00f9ng c\u00f3 th\u1ec3 nh\u1eadp c\u00e1c l\u1ec7nh \u0111\u1ec3 y\u00eau c\u1ea7u h\u1ec7 \u0111i\u1ec1u h\u00e0nh th\u1ef1c hi\u1ec7n nh\u1eefng t\u00e1c v\u1ee5 nh\u01b0 qu\u1ea3n l\u00fd t\u1ec7p tin, kh\u1edfi ch\u1ea1y ch\u01b0\u01a1ng tr\u00ecnh ho\u1eb7c t\u01b0\u01a1ng t\u00e1c v\u1edbi c\u00e1c th\u00e0nh ph\u1ea7n kh\u00e1c c\u1ee7a h\u1ec7 th\u1ed1ng. Shell c\u00f3 th\u1ec3 ho\u1ea1t \u0111\u1ed9ng qua giao di\u1ec7n d\u00f2ng l\u1ec7nh (CLI), n\u01a1i ng\u01b0\u1eddi d\u00f9ng nh\u1eadp l\u1ec7nh tr\u1ef1c ti\u1ebfp, ho\u1eb7c qua giao di\u1ec7n \u0111\u1ed3 h\u1ecda (GUI), t\u00f9y thu\u1ed9c v\u00e0o lo\u1ea1i t\u00e1c v\u1ee5 v\u00e0 vai tr\u00f2 c\u1ee7a m\u00e1y t\u00ednh. M\u1eb7c d\u00f9 giao di\u1ec7n \u0111\u1ed3 h\u1ecda c\u00f3 th\u1ec3 cung c\u1ea5p m\u1ed9t c\u00e1ch ti\u1ebfp c\u1eadn d\u1ec5 d\u00e0ng h\u01a1n cho ng\u01b0\u1eddi d\u00f9ng, giao di\u1ec7n d\u00f2ng l\u1ec7nh v\u1eabn \u0111\u01b0\u1ee3c \u01b0a chu\u1ed9ng v\u00ec t\u00ednh m\u1ea1nh m\u1ebd v\u00e0 kh\u1ea3 n\u0103ng t\u1ef1 \u0111\u1ed9ng h\u00f3a cao.<\/span><\/p>\n<p><a href=\"https:\/\/itviec.com\/blog\/shell-script-la-gi\/\" target=\"_blank\" rel=\"noopener\"><b>Shell Script<\/b><\/a><span style=\"font-weight: 400;\"> l\u00e0 m\u1ed9t t\u1eadp h\u1ee3p c\u00e1c l\u1ec7nh shell \u0111\u01b0\u1ee3c ghi l\u1ea1i trong m\u1ed9t file v\u0103n b\u1ea3n, gi\u00fap t\u1ef1 \u0111\u1ed9ng h\u00f3a c\u00e1c t\u00e1c v\u1ee5 ho\u1eb7c x\u1eed l\u00fd d\u1eef li\u1ec7u m\u00e0 kh\u00f4ng c\u1ea7n ph\u1ea3i nh\u1eadp l\u1ea1i l\u1ec7nh t\u1eebng b\u01b0\u1edbc. M\u1ed9t trong nh\u1eefng l\u1ee3i \u00edch ch\u00ednh c\u1ee7a shell script l\u00e0 kh\u1ea3 n\u0103ng t\u1ef1 \u0111\u1ed9ng h\u00f3a c\u00e1c t\u00e1c v\u1ee5 ph\u1ee9c t\u1ea1p nh\u01b0 sao l\u01b0u d\u1eef li\u1ec7u, c\u00e0i \u0111\u1eb7t ph\u1ea7n m\u1ec1m hay ki\u1ec3m tra t\u00ecnh tr\u1ea1ng h\u1ec7 th\u1ed1ng.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Shell c\u00f3 nhi\u1ec1u lo\u1ea1i Bourne shell (sh), C shell (csh), Korn shell (ksh),&#8230; nh\u01b0ng ph\u1ed5 bi\u1ebfn nh\u1ea5t l\u00e0 <a href=\"https:\/\/itviec.com\/blog\/bash-script-la-gi\/\" target=\"_blank\" rel=\"noopener\"><strong>Bash<\/strong><\/a> (Bourne Again Shell) &#8211; m\u1ed9t lo\u1ea1i shell m\u1ea1nh m\u1ebd \u0111\u01b0\u1ee3c ph\u00e1t tri\u1ec3n t\u1eeb Bourne Shell (sh) v\u00e0 tr\u1edf th\u00e0nh shell m\u1eb7c \u0111\u1ecbnh trong h\u1ea7u h\u1ebft c\u00e1c b\u1ea3n ph\u00e2n ph\u1ed1i Linux. Bash kh\u00f4ng ch\u1ec9 cung c\u1ea5p t\u00ednh t\u01b0\u01a1ng th\u00edch ng\u01b0\u1ee3c v\u1edbi c\u00e1c l\u1ec7nh v\u00e0 script c\u1ee7a Bourne Shell m\u00e0 c\u00f2n b\u1ed5 sung nhi\u1ec1u t\u00ednh n\u0103ng m\u1ea1nh m\u1ebd nh\u01b0 t\u1ef1 \u0111\u1ed9ng ho\u00e0n th\u00e0nh l\u1ec7nh, l\u1ecbch s\u1eed l\u1ec7nh,\u2026 gi\u00fap ng\u01b0\u1eddi d\u00f9ng c\u00f3 th\u1ec3 d\u1ec5 d\u00e0ng t\u01b0\u01a1ng t\u00e1c v\u1edbi h\u1ec7 th\u1ed1ng qua d\u00f2ng l\u1ec7nh.<\/span><\/p>\n<blockquote><p><em>\u0110\u1ecdc th\u00eam: <a href=\"https:\/\/itviec.com\/blog\/shell-vs-bash\/\" target=\"_blank\" rel=\"noopener\"><strong>Shell vs Bash: Ph\u00e2n bi\u1ec7t v\u00e0 l\u1ef1a ch\u1ecdn c\u00f4ng c\u1ee5 ph\u00f9 h\u1ee3p<\/strong><\/a><\/em><\/p><\/blockquote>\n<h2><span class=\"ez-toc-section\" id=\"Vi_sao_Bash_la_shell_pho_bien_nhat_tren_Linux\"><\/span><b>V\u00ec sao Bash l\u00e0 shell ph\u1ed5 bi\u1ebfn nh\u1ea5t tr\u00ean Linux?<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Bash \u0111\u00e3 tr\u1edf th\u00e0nh shell ph\u1ed5 bi\u1ebfn nh\u1ea5t tr\u00ean Linux v\u00e0 c\u00e1c h\u1ec7 \u0111i\u1ec1u h\u00e0nh Unix-like nh\u1edd v\u00e0o nh\u1eefng \u01b0u \u0111i\u1ec3m v\u01b0\u1ee3t tr\u1ed9i nh\u01b0 ti\u1ebft ki\u1ec7m th\u1eddi gian khi l\u00e0m vi\u1ec7c, t\u1ed1i \u01b0u h\u00f3a c\u00e1c t\u00e1c v\u1ee5, gi\u00fap ng\u01b0\u1eddi d\u00f9ng qu\u1ea3n l\u00fd h\u1ec7 th\u1ed1ng hi\u1ec7u qu\u1ea3 h\u01a1n.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">C\u1ee5 th\u1ec3 c\u00e1c \u01b0u \u0111i\u1ec3m ch\u00ednh c\u1ee7a Bash shell tr\u00ean Linux l\u00e0:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>T\u00ednh linh ho\u1ea1t<\/b><span style=\"font-weight: 400;\">: Bash h\u1ed7 tr\u1ee3 nhi\u1ec1u c\u00fa ph\u00e1p v\u00e0 t\u00ednh n\u0103ng m\u1ea1nh m\u1ebd, cho ph\u00e9p ng\u01b0\u1eddi d\u00f9ng th\u1ef1c hi\u1ec7n c\u00e1c t\u00e1c v\u1ee5 \u0111\u01a1n gi\u1ea3n \u0111\u1ebfn ph\u1ee9c t\u1ea1p, t\u1eeb qu\u1ea3n l\u00fd t\u1ec7p \u0111\u1ebfn \u0111i\u1ec1u khi\u1ec3n h\u1ec7 th\u1ed1ng. C\u00f9ng v\u1edbi vi\u1ec7c h\u1ed7 tr\u1ee3 c\u00e1c c\u00f4ng c\u1ee5 m\u1ea1nh m\u1ebd nh\u01b0 <\/span><span style=\"font-weight: 400;\">sed<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">awk<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">grep<\/span><span style=\"font-weight: 400;\">, Bash c\u00f3 th\u1ec3 x\u1eed l\u00fd v\u0103n b\u1ea3n v\u00e0 d\u1eef li\u1ec7u d\u1ec5 d\u00e0ng v\u00e0 hi\u1ec7u qu\u1ea3.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>T\u1ef1 \u0111\u1ed9ng h\u00f3a t\u00e1c v\u1ee5<\/b><span style=\"font-weight: 400;\">: Bash cho ph\u00e9p ng\u01b0\u1eddi d\u00f9ng vi\u1ebft c\u00e1c shell script \u0111\u1ec3 t\u1ef1 \u0111\u1ed9ng h\u00f3a c\u00e1c t\u00e1c v\u1ee5 th\u01b0\u1eddng xuy\u00ean nh\u01b0 sao l\u01b0u, ki\u1ec3m tra t\u00ecnh tr\u1ea1ng h\u1ec7 th\u1ed1ng, c\u00e0i \u0111\u1eb7t ph\u1ea7n m\u1ec1m,&#8230; gi\u00fap gi\u1ea3m thi\u1ec3u c\u00f4ng vi\u1ec7c l\u1eb7p l\u1ea1i v\u00e0 ti\u1ebft ki\u1ec7m th\u1eddi gian cho l\u1eadp tr\u00ecnh vi\u00ean.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>L\u01b0u l\u1ecbch s\u1eed l\u1ec7nh v\u00e0 t\u1ef1 \u0111\u1ed9ng ho\u00e0n th\u00e0nh<\/b><span style=\"font-weight: 400;\">: Bash cung c\u1ea5p t\u00ednh n\u0103ng l\u01b0u l\u1ea1i l\u1ecbch s\u1eed c\u00e1c l\u1ec7nh \u0111\u00e3 th\u1ef1c thi, gi\u00fap ng\u01b0\u1eddi d\u00f9ng c\u00f3 th\u1ec3 d\u1ec5 d\u00e0ng truy xu\u1ea5t l\u1ea1i c\u00e1c l\u1ec7nh tr\u01b0\u1edbc \u0111\u00f3. T\u00ednh n\u0103ng t\u1ef1 \u0111\u1ed9ng ho\u00e0n th\u00e0nh l\u1ec7nh b\u1eb1ng ph\u00edm <\/span><i><span style=\"font-weight: 400;\">Tab<\/span><\/i><span style=\"font-weight: 400;\"> gi\u00fap t\u0103ng t\u1ed1c \u0111\u1ed9 nh\u1eadp l\u1ec7nh, \u0111\u1eb7c bi\u1ec7t h\u1eefu \u00edch khi l\u00e0m vi\u1ec7c v\u1edbi c\u00e1c th\u01b0 m\u1ee5c ho\u1eb7c t\u1ec7p c\u00f3 t\u00ean d\u00e0i.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Kh\u1ea3 n\u0103ng t\u00f9y ch\u1ec9nh<\/b><span style=\"font-weight: 400;\">: Bash c\u00f3 th\u1ec3 d\u1ec5 d\u00e0ng t\u00f9y ch\u1ec9nh th\u00f4ng qua c\u00e1c file c\u1ea5u h\u00ecnh nh\u01b0 <\/span><span style=\"font-weight: 400;\">.bashrc<\/span><span style=\"font-weight: 400;\"> v\u00e0 <\/span><span style=\"font-weight: 400;\">.bash_profile<\/span><span style=\"font-weight: 400;\">. Ng\u01b0\u1eddi d\u00f9ng c\u00f3 th\u1ec3 thay \u0111\u1ed5i prompt, th\u00eam c\u00e1c alias, hay thi\u1ebft l\u1eadp c\u00e1c bi\u1ebfn m\u00f4i tr\u01b0\u1eddng theo nhu c\u1ea7u c\u00f4ng vi\u1ec7c c\u00e1 nh\u00e2n.<\/span><\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Cach_chay_Bash_Shell_tren_Linux\"><\/span><b>C\u00e1ch ch\u1ea1y Bash Shell tr\u00ean Linux<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Bash l\u00e0 m\u1ed9t trong nh\u1eefng shell ph\u1ed5 bi\u1ebfn nh\u1ea5t tr\u00ean Linux v\u00e0 th\u01b0\u1eddng \u0111\u01b0\u1ee3c c\u00e0i s\u1eb5n trong c\u00e1c b\u1ea3n ph\u00e2n ph\u1ed1i Linux. Tuy nhi\u00ean, trong m\u1ed9t s\u1ed1 tr\u01b0\u1eddng h\u1ee3p, b\u1ea1n c\u00f3 th\u1ec3 c\u1ea7n ph\u1ea3i thay \u0111\u1ed5i ho\u1eb7c ki\u1ec3m tra shell hi\u1ec7n t\u1ea1i c\u1ee7a m\u00ecnh.\u00a0<\/span><\/p>\n<h3><b>Ki\u1ec3m tra xem Bash c\u00f3 ph\u1ea3i l\u00e0 shell m\u1eb7c \u0111\u1ecbnh kh\u00f4ng<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Tr\u01b0\u1edbc h\u1ebft, b\u1ea1n c\u1ea7n ki\u1ec3m tra xem Bash c\u00f3 ph\u1ea3i l\u00e0 shell m\u1eb7c \u0111\u1ecbnh trong h\u1ec7 th\u1ed1ng c\u1ee7a m\u00ecnh kh\u00f4ng v\u1edbi l\u1ec7nh sau:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">echo $SHELL<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">L\u1ec7nh n\u00e0y s\u1ebd in ra \u0111\u01b0\u1eddng d\u1eabn \u0111\u1ebfn shell hi\u1ec7n t\u1ea1i m\u00e0 b\u1ea1n \u0111ang s\u1eed d\u1ee5ng. N\u1ebfu k\u1ebft qu\u1ea3 tr\u1ea3 v\u1ec1 l\u00e0 <\/span><span style=\"font-weight: 400;\">\/bin\/bash<\/span><span style=\"font-weight: 400;\"> ho\u1eb7c t\u01b0\u01a1ng t\u1ef1, th\u00ec b\u1ea1n \u0111ang s\u1eed d\u1ee5ng Bash shell. V\u00ed d\u1ee5:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">$ echo $SHELL<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\/bin\/bash<\/span><\/pre>\n<p><b>C\u00e0i \u0111\u1eb7t Bash (n\u1ebfu ch\u01b0a \u0111\u01b0\u1ee3c c\u00e0i \u0111\u1eb7t)<\/b><\/p>\n<p><span style=\"font-weight: 400;\">Tr\u00ean h\u1ec7 th\u1ed1ng d\u1ef1a tr\u00ean Debian\/Ubuntu:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">sudo apt-get update<\/span>\r\n\r\n<span style=\"font-weight: 400;\">sudo apt-get install bash<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">Tr\u00ean h\u1ec7 th\u1ed1ng d\u1ef1a tr\u00ean Red Hat\/Fedora:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">sudo dnf install bash<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">Tr\u00ean h\u1ec7 th\u1ed1ng d\u1ef1a tr\u00ean Arch Linux:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">sudo pacman -S bash<\/span><\/pre>\n<h3><b>Ch\u1ea1y Bash t\u1eeb Terminal<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">N\u1ebfu b\u1ea1n \u0111ang s\u1eed d\u1ee5ng m\u1ed9t shell kh\u00e1c (v\u00ed d\u1ee5, sh ho\u1eb7c zsh), b\u1ea1n c\u00f3 th\u1ec3 d\u1ec5 d\u00e0ng chuy\u1ec3n sang Bash b\u1eb1ng c\u00e1ch g\u00f5 l\u1ec7nh sau trong terminal:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">bash<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">Sau khi nh\u1eadp l\u1ec7nh n\u00e0y, b\u1ea1n s\u1ebd th\u1ea5y prompt c\u1ee7a terminal thay \u0111\u1ed5i \u0111\u1ec3 ph\u1ea3n \u00e1nh vi\u1ec7c chuy\u1ec3n sang Bash. V\u00ed d\u1ee5:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">$ bash<\/span>\r\n\r\n<span style=\"font-weight: 400;\">user@linux:~$<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">Khi \u0111\u00e3 chuy\u1ec3n sang Bash, b\u1ea1n c\u00f3 th\u1ec3 b\u1eaft \u0111\u1ea7u th\u1ef1c thi c\u00e1c l\u1ec7nh Bash ngay l\u1eadp t\u1ee9c.<\/span><\/p>\n<h3><b>C\u00e1ch thay \u0111\u1ed5i shell m\u1eb7c \u0111\u1ecbnh th\u00e0nh Bash<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">N\u1ebfu Bash kh\u00f4ng ph\u1ea3i l\u00e0 shell m\u1eb7c \u0111\u1ecbnh c\u1ee7a b\u1ea1n v\u00e0 b\u1ea1n mu\u1ed1n thay \u0111\u1ed5i shell m\u1eb7c \u0111\u1ecbnh th\u00e0nh Bash, b\u1ea1n c\u00f3 th\u1ec3 s\u1eed d\u1ee5ng l\u1ec7nh <\/span><span style=\"font-weight: 400;\">chsh<\/span><span style=\"font-weight: 400;\"> (change shell) v\u1edbi c\u00fa ph\u00e1p nh\u01b0 sau:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">chsh -s \/bin\/bash<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">L\u1ec7nh n\u00e0y s\u1ebd thay \u0111\u1ed5i shell m\u1eb7c \u0111\u1ecbnh th\u00e0nh Bash v\u00e0 s\u1ebd y\u00eau c\u1ea7u b\u1ea1n nh\u1eadp m\u1eadt kh\u1ea9u c\u1ee7a m\u00ecnh r\u1ed3i sau \u0111\u00f3 \u0111\u0103ng xu\u1ea5t v\u00e0 \u0111\u0103ng nh\u1eadp l\u1ea1i \u0111\u1ec3 thay \u0111\u1ed5i c\u00f3 hi\u1ec7u l\u1ef1c.<\/span><\/p>\n<h3><b>T\u1ea1o v\u00e0 ch\u1ea1y m\u1ed9t Bash Script<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Bash kh\u00f4ng ch\u1ec9 l\u00e0 m\u1ed9t shell m\u00e0 c\u00f2n h\u1ed7 tr\u1ee3 l\u1eadp tr\u00ecnh shell th\u00f4ng qua c\u00e1c script. B\u1ea1n c\u00f3 th\u1ec3 t\u1ea1o m\u1ed9t file script v\u00e0 ch\u1ea1y n\u00f3 tr\u00ean Bash. V\u00ed d\u1ee5, \u0111\u1ec3 t\u1ea1o m\u1ed9t script \u0111\u01a1n gi\u1ea3n:<\/span><\/p>\n<p><span style=\"font-weight: 400;\">B\u01b0\u1edbc 1: M\u1edf m\u1ed9t tr\u00ecnh so\u1ea1n th\u1ea3o v\u0103n b\u1ea3n (v\u00ed d\u1ee5, <\/span><span style=\"font-weight: 400;\">nano<\/span><span style=\"font-weight: 400;\"> ho\u1eb7c <\/span><span style=\"font-weight: 400;\">vim<\/span><span style=\"font-weight: 400;\">) \u0111\u1ec3 t\u1ea1o file:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">nano hello.sh<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">B\u01b0\u1edbc 2: Th\u00eam n\u1ed9i dung sau v\u00e0o file script:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">#!\/bin\/bash<\/span>\r\n\r\n<span style=\"font-weight: 400;\">echo \"Hello, World!\"<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">L\u01b0u v\u00e0 \u0111\u00f3ng file (<\/span><span style=\"font-weight: 400;\">Ctrl + X<\/span><span style=\"font-weight: 400;\"> \u0111\u1ec3 l\u01b0u trong <\/span><span style=\"font-weight: 400;\">nano<\/span><span style=\"font-weight: 400;\">).<\/span><\/p>\n<p><span style=\"font-weight: 400;\">D\u00f2ng \u0111\u1ea7u ti\u00ean <\/span><span style=\"font-weight: 400;\">#!\/bin\/bash<\/span><span style=\"font-weight: 400;\"> \u0111\u01b0\u1ee3c g\u1ecdi l\u00e0 shebang, cho h\u1ec7 th\u1ed1ng bi\u1ebft script n\u00e0y n\u00ean \u0111\u01b0\u1ee3c th\u1ef1c thi b\u1eb1ng Bash.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">B\u01b0\u1edbc 3: \u0110\u1ec3 ch\u1ea1y script, b\u1ea1n c\u1ea7n c\u1ea5p quy\u1ec1n th\u1ef1c thi cho file v\u1edbi l\u1ec7nh:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">chmod +x hello.sh<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">B\u01b0\u1edbc 4: Sau \u0111\u00f3, b\u1ea1n c\u00f3 th\u1ec3 ch\u1ea1y script n\u00e0y b\u1eb1ng l\u1ec7nh:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">.\/hello.sh<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">K\u1ebft qu\u1ea3 s\u1ebd l\u00e0:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">Hello, World!<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><span class=\"ez-toc-section\" id=\"Tong_hop_cac_lenh_Bash_shell_linux_co_ban\"><\/span><b>T\u1ed5ng h\u1ee3p c\u00e1c l\u1ec7nh Bash shell linux c\u01a1 b\u1ea3n<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><strong>cat<\/strong><\/h3>\n<p><span style=\"font-weight: 400;\"><strong>M\u00f4 t\u1ea3:<\/strong> \u0110\u1ecdc v\u00e0 hi\u1ec3n th\u1ecb n\u1ed9i dung c\u1ee7a t\u1ec7p.<\/span><\/p>\n<p><strong>C\u00fa ph\u00e1p:<\/strong><\/p>\n<pre><span style=\"font-weight: 400;\">cat [options] [file_names]<\/span><\/pre>\n<p><strong>T\u00f9y ch\u1ecdn:<\/strong><\/p>\n<ul>\n<li><span style=\"font-weight: 400;\">-b<\/span><span style=\"font-weight: 400;\">: \u0110\u00e1nh s\u1ed1 c\u00e1c d\u00f2ng kh\u00f4ng tr\u1ed1ng.<\/span><\/li>\n<li><span style=\"font-weight: 400;\">-n<\/span><span style=\"font-weight: 400;\">: \u0110\u00e1nh s\u1ed1 t\u1ea5t c\u1ea3 c\u00e1c d\u00f2ng.<\/span><\/li>\n<li><span style=\"font-weight: 400;\">-s: X\u00f3a c\u00e1c d\u00f2ng tr\u1ed1ng li\u00ean ti\u1ebfp.<\/span><\/li>\n<li><span style=\"font-weight: 400;\">-v<\/span><span style=\"font-weight: 400;\">: Hi\u1ec3n th\u1ecb c\u00e1c k\u00fd t\u1ef1 kh\u00f4ng in \u0111\u01b0\u1ee3c (ngo\u1ea1i tr\u1eeb tab v\u00e0 k\u00fd t\u1ef1 xu\u1ed1ng d\u00f2ng).<\/span><\/li>\n<\/ul>\n<p><strong>V\u00ed d\u1ee5:<\/strong><\/p>\n<p><span style=\"font-weight: 400;\">In to\u00e0n b\u1ed9 n\u1ed9i dung c\u1ee7a t\u1ec7p <\/span><i><span style=\"font-weight: 400;\">file.txt<\/span><\/i><span style=\"font-weight: 400;\">:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">cat file.txt<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">Hi\u1ec3n th\u1ecb n\u1ed9i dung c\u1ee7a t\u1ec7p v\u00e0 \u0111\u00e1nh s\u1ed1 t\u1ea5t c\u1ea3 c\u00e1c d\u00f2ng:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">cat -n file.txt<\/span><\/pre>\n<h3><strong>cd<\/strong><\/h3>\n<p><span style=\"font-weight: 400;\"><strong>M\u00f4 t\u1ea3:<\/strong> Thay \u0111\u1ed5i th\u01b0 m\u1ee5c l\u00e0m vi\u1ec7c.<\/span><\/p>\n<p><strong>C\u00fa ph\u00e1p:<\/strong><\/p>\n<pre><span style=\"font-weight: 400;\">cd [directory_path]<\/span><\/pre>\n<p><strong>V\u00ed d\u1ee5:<\/strong><\/p>\n<p><span style=\"font-weight: 400;\">Chuy\u1ec3n \u0111\u1ebfn th\u01b0 m\u1ee5c <\/span><i><span style=\"font-weight: 400;\">projects<\/span><\/i><span style=\"font-weight: 400;\">:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">cd projects<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">Chuy\u1ec3n \u0111\u1ebfn th\u01b0 m\u1ee5c <\/span><i><span style=\"font-weight: 400;\">projects<\/span><\/i><span style=\"font-weight: 400;\"> trong th\u01b0 m\u1ee5c ng\u01b0\u1eddi d\u00f9ng:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">cd ~\/projects<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">Tr\u1edf v\u1ec1 th\u01b0 m\u1ee5c home:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">cd ~<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">Tr\u1edf v\u1ec1 th\u01b0 m\u1ee5c tr\u01b0\u1edbc \u0111\u00f3:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">cd -<\/span><\/pre>\n<h3><strong>head<\/strong><\/h3>\n<p><span style=\"font-weight: 400;\"><strong>M\u00f4 t\u1ea3:<\/strong> Hi\u1ec3n th\u1ecb 10 d\u00f2ng \u0111\u1ea7u ti\u00ean c\u1ee7a t\u1ec7p (m\u1eb7c \u0111\u1ecbnh).<\/span><\/p>\n<p><strong>C\u00fa ph\u00e1p:<\/strong><\/p>\n<pre><span style=\"font-weight: 400;\">head [options] [file_name(s)]<\/span><\/pre>\n<p><strong>T\u00f9y ch\u1ecdn:<\/strong><\/p>\n<ul>\n<li>-n N: Hi\u1ec3n th\u1ecb N d\u00f2ng \u0111\u1ea7u ti\u00ean c\u1ee7a t\u1ec7p.<\/li>\n<li>-q: Kh\u00f4ng hi\u1ec3n th\u1ecb ti\u00eau \u0111\u1ec1 c\u1ee7a t\u1ec7p khi c\u00f3 nhi\u1ec1u t\u1ec7p.<\/li>\n<li>-v: Lu\u00f4n hi\u1ec3n th\u1ecb ti\u00eau \u0111\u1ec1 c\u1ee7a t\u1ec7p.<\/li>\n<\/ul>\n<p><strong>V\u00ed d\u1ee5:<\/strong><\/p>\n<p>Hi\u1ec3n th\u1ecb 7 d\u00f2ng \u0111\u1ea7u ti\u00ean c\u1ee7a t\u1ec7p file.txt:<\/p>\n<pre>head -n 7 file.txt<\/pre>\n<h3><strong>ls<\/strong><\/h3>\n<p><span style=\"font-weight: 400;\"><strong>M\u00f4 t\u1ea3:<\/strong> Li\u1ec7t k\u00ea c\u00e1c t\u1ec7p v\u00e0 th\u01b0 m\u1ee5c trong th\u01b0 m\u1ee5c hi\u1ec7n t\u1ea1i ho\u1eb7c th\u01b0 m\u1ee5c ch\u1ec9 \u0111\u1ecbnh.<\/span><\/p>\n<p><strong>C\u00fa ph\u00e1p:<\/strong><\/p>\n<pre>ls [options] [directory_path]<\/pre>\n<p><strong>T\u00f9y ch\u1ecdn:<\/strong><\/p>\n<ul>\n<li>-a: Li\u1ec7t k\u00ea t\u1ea5t c\u1ea3 c\u00e1c t\u1ec7p, bao g\u1ed3m c\u00e1c t\u1ec7p \u1ea9n (b\u1eaft \u0111\u1ea7u b\u1eb1ng d\u1ea5u ch\u1ea5m).<\/li>\n<li>-l: Hi\u1ec3n th\u1ecb chi ti\u1ebft th\u00f4ng tin c\u1ee7a c\u00e1c t\u1ec7p, nh\u01b0 quy\u1ec1n truy c\u1eadp, k\u00edch th\u01b0\u1edbc, th\u1eddi gian s\u1eeda \u0111\u1ed5i, &#8230;<\/li>\n<li>-G: Hi\u1ec3n th\u1ecb k\u1ebft qu\u1ea3 c\u00f3 m\u00e0u s\u1eafc (n\u1ebfu h\u1ec7 th\u1ed1ng h\u1ed7 tr\u1ee3).<\/li>\n<li>-r: Hi\u1ec3n th\u1ecb theo th\u1ee9 t\u1ef1 ng\u01b0\u1ee3c.<\/li>\n<li>-t: S\u1eafp x\u1ebfp theo th\u1eddi gian s\u1eeda \u0111\u1ed5i.<\/li>\n<\/ul>\n<p><strong>V\u00ed d\u1ee5:<\/strong><\/p>\n<p>Li\u1ec7t k\u00ea t\u1ea5t c\u1ea3 c\u00e1c t\u1ec7p v\u00e0 th\u01b0 m\u1ee5c trong th\u01b0 m\u1ee5c hi\u1ec7n t\u1ea1i:<\/p>\n<pre>ls<\/pre>\n<p>Li\u1ec7t k\u00ea t\u1ea5t c\u1ea3 c\u00e1c t\u1ec7p, bao g\u1ed3m t\u1ec7p \u1ea9n:<\/p>\n<pre>ls -a<\/pre>\n<p>Li\u1ec7t k\u00ea th\u00f4ng tin chi ti\u1ebft c\u1ee7a c\u00e1c t\u1ec7p trong th\u01b0 m\u1ee5c:<\/p>\n<pre>ls -l<\/pre>\n<p>Li\u1ec7t k\u00ea chi ti\u1ebft v\u1edbi k\u00edch th\u01b0\u1edbc \u0111\u1ecdc \u0111\u01b0\u1ee3c:<\/p>\n<pre>ls -lh<\/pre>\n<h3><strong>man<\/strong><\/h3>\n<p><span style=\"font-weight: 400;\"><strong>M\u00f4 t\u1ea3:<\/strong> Hi\u1ec3n th\u1ecb t\u00e0i li\u1ec7u h\u01b0\u1edbng d\u1eabn s\u1eed d\u1ee5ng c\u1ee7a m\u1ed9t l\u1ec7nh.<\/span><\/p>\n<p><strong>C\u00fa ph\u00e1p:<\/strong><\/p>\n<pre>man [options] [command]<\/pre>\n<p><strong>T\u00f9y ch\u1ecdn:<\/strong><\/p>\n<ul>\n<li>-f: In m\u00f4 t\u1ea3 ng\u1eafn v\u1ec1 l\u1ec7nh.<\/li>\n<li>-a: Hi\u1ec3n th\u1ecb t\u1ea5t c\u1ea3 c\u00e1c trang t\u00e0i li\u1ec7u li\u00ean quan \u0111\u1ebfn l\u1ec7nh.<\/li>\n<\/ul>\n<p><strong>V\u00ed d\u1ee5:<\/strong><\/p>\n<p>Hi\u1ec3n th\u1ecb m\u00f4 t\u1ea3 ng\u1eafn c\u1ee7a l\u1ec7nh ls:<\/p>\n<pre>man -f ls<\/pre>\n<h3><strong>mv<\/strong><\/h3>\n<p><span style=\"font-weight: 400;\"><strong>M\u00f4 t\u1ea3:<\/strong> Di chuy\u1ec3n t\u1ec7p ho\u1eb7c th\u01b0 m\u1ee5c t\u1eeb v\u1ecb tr\u00ed n\u00e0y \u0111\u1ebfn v\u1ecb tr\u00ed kh\u00e1c.<\/span><\/p>\n<p><strong>C\u00fa ph\u00e1p:<\/strong><\/p>\n<pre>mv [options] source target<\/pre>\n<p><strong>T\u00f9y ch\u1ecdn:<\/strong><\/p>\n<ul>\n<li>-f: Di chuy\u1ec3n m\u00e0 kh\u00f4ng y\u00eau c\u1ea7u x\u00e1c nh\u1eadn, thay th\u1ebf c\u00e1c t\u1ec7p \u0111\u00edch n\u1ebfu \u0111\u00e3 t\u1ed3n t\u1ea1i.<\/li>\n<li>-i: Y\u00eau c\u1ea7u x\u00e1c nh\u1eadn tr\u01b0\u1edbc khi thay th\u1ebf t\u1ec7p \u0111\u00edch n\u1ebfu c\u00f3.<\/li>\n<li>-v: Hi\u1ec3n th\u1ecb th\u00f4ng tin v\u1ec1 qu\u00e1 tr\u00ecnh di chuy\u1ec3n.<\/li>\n<\/ul>\n<p><strong>V\u00ed d\u1ee5:<\/strong><\/p>\n<p>Di chuy\u1ec3n t\u1ec7p file1.txt \u0111\u1ebfn th\u01b0 m\u1ee5c \/home\/user\/:<\/p>\n<pre>mv file1.txt \/home\/user\/<\/pre>\n<p>\u0110\u1ed5i t\u00ean file1.txt th\u00e0nh file2.txt:<\/p>\n<pre>mv file1.txt file2.txt<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"Cac_cau_hinh_tuy_chinh_cho_Bash\"><\/span><b>C\u00e1c c\u1ea5u h\u00ecnh t\u00f9y ch\u1ec9nh cho Bash<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><b>T\u00f9y ch\u1ec9nh Bash Prompt<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Bash prompt l\u00e0 giao di\u1ec7n m\u00e0 b\u1ea1n nh\u00ecn th\u1ea5y khi m\u1edf terminal trong h\u1ec7 \u0111i\u1ec1u h\u00e0nh Linux ho\u1eb7c Unix. N\u00f3 hi\u1ec3n th\u1ecb th\u00f4ng tin v\u1ec1 h\u1ec7 th\u1ed1ng c\u1ee7a b\u1ea1n v\u00e0 cho ph\u00e9p b\u1ea1n nh\u1eadp c\u00e1c l\u1ec7nh v\u00e0o \u0111\u1ec3 t\u01b0\u01a1ng t\u00e1c v\u1edbi h\u1ec7 \u0111i\u1ec1u h\u00e0nh. \u0110\u1eb7c bi\u1ec7t, Bash prompt c\u00f3 th\u1ec3 \u0111\u01b0\u1ee3c t\u00f9y ch\u1ec9nh \u0111\u1ec3 hi\u1ec3n th\u1ecb c\u00e1c th\u00f4ng tin kh\u00e1c nhau v\u00e0 thay \u0111\u1ed5i m\u00e0u s\u1eafc ho\u1eb7c c\u1ea5u tr\u00fac \u0111\u1ec3 d\u1ec5 s\u1eed d\u1ee5ng h\u01a1n.<\/span><\/p>\n<h4><b>M\u1eb7c \u0111\u1ecbnh c\u1ee7a Bash prompt<\/b><\/h4>\n<pre><span style=\"font-weight: 400;\">PS1='\\u@\\h:\\w\\$ '<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">Trong \u0111\u00f3:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">\\u<\/span><span style=\"font-weight: 400;\">: T\u00ean ng\u01b0\u1eddi d\u00f9ng<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">\\h<\/span><span style=\"font-weight: 400;\">: T\u00ean m\u00e1y t\u00ednh<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">\\w<\/span><span style=\"font-weight: 400;\">: Th\u01b0 m\u1ee5c hi\u1ec7n t\u1ea1i<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">\\$<\/span><span style=\"font-weight: 400;\">: D\u1ea5u nh\u1eafc l\u1ec7nh, <\/span><span style=\"font-weight: 400;\">$<\/span><span style=\"font-weight: 400;\"> cho ng\u01b0\u1eddi d\u00f9ng b\u00ecnh th\u01b0\u1eddng v\u00e0 <\/span><span style=\"font-weight: 400;\">#<\/span><span style=\"font-weight: 400;\"> cho root<\/span><\/li>\n<\/ul>\n<h4><b>Th\u00eam m\u00e0u s\u1eafc cho Bash Prompt<\/b><\/h4>\n<p><span style=\"font-weight: 400;\">Ta c\u00f3 th\u1ec3 th\u00eam m\u00e0u s\u1eafc cho prompt \u0111\u1ec3 d\u1ec5 d\u00e0ng nh\u1eadn di\u1ec7n. V\u00ed d\u1ee5, \u0111\u1ec3 \u0111\u1ed5i m\u00e0u cho t\u00ean ng\u01b0\u1eddi d\u00f9ng v\u00e0 th\u01b0 m\u1ee5c hi\u1ec7n t\u1ea1i v\u1edbi c\u00fa ph\u00e1p sau:<\/span><\/p>\n<pre>PS1='\\[\\033[01;32m\\]\\u@\\h \\[\\033[01;34m\\]\\w\\[\\033[00m\\] \\$ '<\/pre>\n<p><span style=\"font-weight: 400;\">Trong \u0111\u00f3:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">\\[\\033[01;32m\\]<\/span><span style=\"font-weight: 400;\">: \u0110\u1ed5i m\u00e0u xanh cho t\u00ean ng\u01b0\u1eddi d\u00f9ng.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">\\[\\033[01;34m\\]<\/span><span style=\"font-weight: 400;\">: \u0110\u1ed5i m\u00e0u xanh d\u01b0\u01a1ng cho th\u01b0 m\u1ee5c hi\u1ec7n t\u1ea1i.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">\\[\\033[00m\\]:<\/span><span style=\"font-weight: 400;\"> \u0110\u1eb7t l\u1ea1i v\u1ec1 m\u00e0u m\u1eb7c \u0111\u1ecbnh<\/span><\/li>\n<\/ul>\n<h4><b>Hi\u1ec3n th\u1ecb th\u1eddi gian trong Bash Prompt<\/b><\/h4>\n<p><span style=\"font-weight: 400;\">N\u1ebfu mu\u1ed1n xem th\u1eddi gian m\u1ed7i khi nh\u1eadp l\u1ec7nh, b\u1ea1n c\u00f3 th\u1ec3 th\u00eam th\u1eddi gian v\u00e0o prompt v\u1edbi c\u00fa ph\u00e1p nh\u01b0 sau:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">PS1='\\u@\\h:\\w \\t\\$ '<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">Trong \u0111\u00f3:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">\\t<\/span><span style=\"font-weight: 400;\">: Hi\u1ec3n th\u1ecb th\u1eddi gian hi\u1ec7n t\u1ea1i.<\/span><\/li>\n<\/ul>\n<h4><b>C\u00e1c k\u00fd t\u1ef1 \u0111\u1eb7c bi\u1ec7t kh\u00e1c trong Prompt<\/b><\/h4>\n<ul>\n<li><span style=\"font-weight: 400;\">\\d<\/span><span style=\"font-weight: 400;\">: Ng\u00e0y hi\u1ec7n t\u1ea1i (\u0111\u1ecbnh d\u1ea1ng &#8220;Th\u1ee9 Th\u00e1ng Ng\u00e0y&#8221;)<\/span><\/li>\n<li><span style=\"font-weight: 400;\">\\A<\/span><span style=\"font-weight: 400;\">: Th\u1eddi gian hi\u1ec7n t\u1ea1i (\u0111\u1ecbnh d\u1ea1ng 24 gi\u1edd HH)<\/span><\/li>\n<li><span style=\"font-weight: 400;\">\\j<\/span><span style=\"font-weight: 400;\">: S\u1ed1 l\u01b0\u1ee3ng ti\u1ebfn tr\u00ecnh \u0111ang ch\u1ea1y trong phi\u00ean terminal hi\u1ec7n t\u1ea1i<\/span><\/li>\n<li><span style=\"font-weight: 400;\">\\!<\/span><span style=\"font-weight: 400;\">: S\u1ed1 hi\u1ec7u l\u1ec7nh trong l\u1ecbch s\u1eed<\/span><\/li>\n<li><span style=\"font-weight: 400;\">\\#<\/span><span style=\"font-weight: 400;\">: S\u1ed1 l\u1ec7nh c\u1ee7a phi\u00ean shell hi\u1ec7n t\u1ea1i<\/span><\/li>\n<\/ul>\n<h3><b>T\u00f9y ch\u1ec9nh c\u00e1c Alias<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Alias cho ph\u00e9p b\u1ea1n t\u1ea1o c\u00e1c l\u1ec7nh t\u1eaft thay v\u00ec ph\u1ea3i nh\u1eadp l\u1ec7nh d\u00e0i m\u1ed7i l\u1ea7n, gi\u00fap ti\u1ebft ki\u1ec7m th\u1eddi gian v\u00e0 t\u0103ng hi\u1ec7u qu\u1ea3 c\u00f4ng vi\u1ec7c.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">C\u00fa ph\u00e1p t\u1ea1o alias:<\/span><\/p>\n<pre>alias t\u00ean_l\u1ec7nh_t\u1eaft='l\u1ec7nh_\u0111\u1ea7y_\u0111\u1ee7'<\/pre>\n<p><span style=\"font-weight: 400;\">V\u00ed d\u1ee5 \u0111\u1ec3 t\u1ea1o alias:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\"># Di chuy\u1ec3n nhanh v\u00e0o th\u01b0 m\u1ee5c<\/span>\r\n\r\n<span style=\"font-weight: 400;\">alias projects='cd ~\/projects'<\/span>\r\n\r\n<span style=\"font-weight: 400;\"># Li\u1ec7t k\u00ea chi ti\u1ebft c\u00e1c file v\u00e0 th\u01b0 m\u1ee5c<\/span>\r\n\r\n<span style=\"font-weight: 400;\">alias ll='ls -l'<\/span>\r\n\r\n<span style=\"font-weight: 400;\"># Ki\u1ec3m tra tr\u1ea1ng th\u00e1i Git<\/span>\r\n\r\n<span style=\"font-weight: 400;\">alias gs='git status'<\/span>\r\n\r\n<span style=\"font-weight: 400;\"># C\u1eadp nh\u1eadt h\u1ec7 th\u1ed1ng\u00a0<\/span>\r\n\r\n<span style=\"font-weight: 400;\">alias update='sudo apt update &amp;&amp; sudo apt upgrade'<\/span><\/pre>\n<h3><b>C\u1ea5u h\u00ecnh m\u00f4i tr\u01b0\u1eddng shell\u00a0<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">C\u00e1c bi\u1ebfn m\u00f4i tr\u01b0\u1eddng (environment variables) gi\u00fap Bash bi\u1ebft c\u00e1ch th\u1ef1c thi c\u00e1c l\u1ec7nh v\u00e0 ch\u01b0\u01a1ng tr\u00ecnh. M\u1ed9t s\u1ed1 bi\u1ebfn m\u00f4i tr\u01b0\u1eddng th\u00f4ng d\u1ee5ng bao g\u1ed3m:<\/span><\/p>\n<h4><b>$PATH<\/b><\/h4>\n<p><span style=\"font-weight: 400;\">Bi\u1ebfn n\u00e0y ch\u1ee9a danh s\u00e1ch c\u00e1c th\u01b0 m\u1ee5c m\u00e0 Bash t\u00ecm ki\u1ebfm khi th\u1ef1c thi l\u1ec7nh. B\u1ea1n c\u00f3 th\u1ec3 th\u00eam th\u01b0 m\u1ee5c v\u00e0o $PATH \u0111\u1ec3 Bash bi\u1ebft n\u01a1i t\u00ecm c\u00e1c l\u1ec7nh t\u00f9y ch\u1ec9nh c\u1ee7a b\u1ea1n. V\u00ed d\u1ee5 \u0111\u1ec3 th\u00eam <\/span><span style=\"font-weight: 400;\">\/my\/custom\/path<\/span><span style=\"font-weight: 400;\"> v\u00e0o cu\u1ed1i danh s\u00e1ch c\u00e1c th\u01b0 m\u1ee5c trong bi\u1ebfn $PATH ta d\u00f9ng c\u00fa ph\u00e1p:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">export PATH=$PATH:\/my\/custom\/path<\/span><\/pre>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>$HOME<\/b><span style=\"font-weight: 400;\">: Bi\u1ebfn n\u00e0y l\u01b0u tr\u1eef th\u01b0 m\u1ee5c nh\u00e0 c\u1ee7a ng\u01b0\u1eddi d\u00f9ng. B\u1ea1n c\u00f3 th\u1ec3 thay \u0111\u1ed5i bi\u1ebfn n\u00e0y n\u1ebfu c\u1ea7n thi\u1ebft.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>$USER:<\/b><span style=\"font-weight: 400;\"> T\u00ean ng\u01b0\u1eddi d\u00f9ng hi\u1ec7n t\u1ea1i<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>$SHELL:<\/b><span style=\"font-weight: 400;\"> Shell \u0111ang s\u1eed d\u1ee5ng<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>$HISTSIZE:<\/b><span style=\"font-weight: 400;\"> S\u1ed1 l\u01b0\u1ee3ng l\u1ec7nh l\u01b0u trong l\u1ecbch s\u1eed<\/span><\/li>\n<\/ul>\n<h4><b>Th\u00eam th\u01b0 m\u1ee5c v\u00e0o $PATH<\/b><\/h4>\n<pre><span style=\"font-weight: 400;\">export PATH=$PATH:\/my\/custom\/path<\/span><\/pre>\n<h4><b>Xem gi\u00e1 tr\u1ecb bi\u1ebfn m\u00f4i tr\u01b0\u1eddng<\/b><\/h4>\n<pre><span style=\"font-weight: 400;\">echo $T\u00caN_BI\u1ebeN<\/span><\/pre>\n<h4><b>Li\u1ec7t k\u00ea t\u1ea5t c\u1ea3 bi\u1ebfn m\u00f4i tr\u01b0\u1eddng<\/b><\/h4>\n<pre><span style=\"font-weight: 400;\">env<\/span><\/pre>\n<h3><b>C\u1ea5u h\u00ecnh t\u1ef1 \u0111\u1ed9ng h\u00f3a v\u00e0 s\u1eed d\u1ee5ng t\u1eadp ti<\/b><strong>n .bashrc<\/strong><\/h3>\n<p><span style=\"font-weight: 400;\">T\u1eadp tin .bashrc l\u00e0 m\u1ed9t trong nh\u1eefng t\u1eadp tin c\u1ea5u h\u00ecnh quan tr\u1ecdng trong m\u00f4i tr\u01b0\u1eddng Bash shell tr\u00ean h\u1ec7 th\u1ed1ng Linux. Khi b\u1ea1n m\u1edf m\u1ed9t terminal m\u1edbi, h\u1ec7 th\u1ed1ng s\u1ebd t\u1ef1 \u0111\u1ed9ng t\u1ea3i c\u00e1c thi\u1ebft l\u1eadp t\u1eeb t\u1eadp tin n\u00e0y. \u0110\u00e2y l\u00e0 n\u01a1i b\u1ea1n c\u00f3 th\u1ec3 c\u1ea5u h\u00ecnh c\u00e1c l\u1ec7nh v\u00e0 m\u00f4i tr\u01b0\u1eddng c\u1ee7a shell \u0111\u1ec3 t\u1ef1 \u0111\u1ed9ng h\u00f3a c\u00e1c t\u00e1c v\u1ee5 v\u00e0 t\u00f9y ch\u1ec9nh l\u1ea1i m\u00f4i tr\u01b0\u1eddng l\u00e0m vi\u1ec7c c\u1ee7a m\u00ecnh m\u1ed7i khi m\u1edf terminal.<\/span><\/p>\n<h4><b>Th\u00eam Aliases (bi\u1ec7t danh)<\/b><\/h4>\n<p><span style=\"font-weight: 400;\">Aliases l\u00e0 c\u00e1ch \u0111\u1ec3 t\u1ea1o c\u00e1c t\u00ean ng\u1eafn g\u1ecdn cho c\u00e1c l\u1ec7nh d\u00e0i ho\u1eb7c th\u01b0\u1eddng xuy\u00ean s\u1eed d\u1ee5ng, gi\u00fap ti\u1ebft ki\u1ec7m th\u1eddi gian v\u00e0 c\u00f4ng s\u1ee9c. V\u00ed d\u1ee5, thay v\u00ec g\u00f5 m\u1ed9t l\u1ec7nh d\u00e0i m\u1ed7i l\u1ea7n, b\u1ea1n c\u00f3 th\u1ec3 t\u1ea1o alias \u0111\u1ec3 ch\u1ec9 c\u1ea7n g\u00f5 m\u1ed9t t\u1eeb ng\u1eafn.<\/span><\/p>\n<p><b>V\u00ed d\u1ee5 c\u1ea5u h\u00ecnh alias trong .bashrc:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">M\u1edf t\u1eadp tin <\/span><span style=\"font-weight: 400;\">.bashrc<\/span><span style=\"font-weight: 400;\"> trong tr\u00ecnh so\u1ea1n th\u1ea3o (v\u00ed d\u1ee5: <\/span><span style=\"font-weight: 400;\">nano<\/span> <span style=\"font-weight: 400;\">~\/.bashrc<\/span><span style=\"font-weight: 400;\">), sau \u0111\u00f3 th\u00eam v\u00e0o c\u00e1c alias sau:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">alias ll='ls -l'\u00a0 # Hi\u1ec3n th\u1ecb th\u01b0 m\u1ee5c v\u1edbi th\u00f4ng tin chi ti\u1ebft<\/span>\r\n\r\n<span style=\"font-weight: 400;\">alias gs='git status'\u00a0 # Xem tr\u1ea1ng th\u00e1i c\u1ee7a git<\/span>\r\n\r\n<span style=\"font-weight: 400;\">alias update='sudo apt update &amp;&amp; sudo apt upgrade'\u00a0 # C\u1eadp nh\u1eadt h\u1ec7 th\u1ed1ng<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">Sau khi th\u00eam alias, b\u1ea1n c\u1ea7n \u00e1p d\u1ee5ng thay \u0111\u1ed5i b\u1eb1ng c\u00e1ch ch\u1ea1y l\u1ec7nh:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">source ~\/.bashrc<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">B\u00e2y gi\u1edd, thay v\u00ec g\u00f5 <\/span><span style=\"font-weight: 400;\">ls -l<\/span><span style=\"font-weight: 400;\">, b\u1ea1n ch\u1ec9 c\u1ea7n g\u00f5 <\/span><span style=\"font-weight: 400;\">ll<\/span><span style=\"font-weight: 400;\">.<\/span><\/p>\n<h4><b>Th\u00eam bi\u1ebfn m\u00f4i tr\u01b0\u1eddng t\u00f9y ch\u1ec9nh<\/b><\/h4>\n<p><span style=\"font-weight: 400;\">B\u1ea1n c\u00f3 th\u1ec3 s\u1eed d\u1ee5ng <\/span><i><span style=\"font-weight: 400;\">.bashrc<\/span><\/i><span style=\"font-weight: 400;\"> \u0111\u1ec3 \u0111\u1ecbnh ngh\u0129a c\u00e1c bi\u1ebfn m\u00f4i tr\u01b0\u1eddng m\u00e0 s\u1ebd \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng trong su\u1ed1t phi\u00ean l\u00e0m vi\u1ec7c trong terminal.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Gi\u1ea3 s\u1eed b\u1ea1n mu\u1ed1n th\u00eam th\u01b0 m\u1ee5c t\u00f9y ch\u1ec9nh v\u00e0o bi\u1ebfn <\/span><span style=\"font-weight: 400;\">PATH<\/span><span style=\"font-weight: 400;\"> \u0111\u1ec3 c\u00f3 th\u1ec3 ch\u1ea1y l\u1ec7nh t\u1eeb \u0111\u00f3 m\u00e0 kh\u00f4ng c\u1ea7n nh\u1eadp \u0111\u01b0\u1eddng d\u1eabn \u0111\u1ea7y \u0111\u1ee7:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">export PATH=$PATH:\/home\/username\/my_custom_bin<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">Sau khi l\u01b0u v\u00e0 t\u1ea3i l\u1ea1i <\/span><span style=\"font-weight: 400;\">.bashrc<\/span><span style=\"font-weight: 400;\">, b\u1ea1n s\u1ebd c\u00f3 th\u1ec3 ch\u1ea1y c\u00e1c l\u1ec7nh trong th\u01b0 m\u1ee5c <\/span><i><span style=\"font-weight: 400;\">my_custom_bin<\/span><\/i><span style=\"font-weight: 400;\"> m\u00e0 kh\u00f4ng c\u1ea7n ch\u1ec9 \u0111\u1ecbnh \u0111\u1ea7y \u0111\u1ee7 \u0111\u01b0\u1eddng d\u1eabn.<\/span><\/p>\n<h4><b>C\u1ea5u h\u00ecnh Prompt (D\u1ea5u nh\u1eafc l\u1ec7nh)<\/b><\/h4>\n<p><span style=\"font-weight: 400;\">M\u1ed9t t\u00ednh n\u0103ng m\u1ea1nh m\u1ebd kh\u00e1c c\u1ee7a .bashrc l\u00e0 kh\u1ea3 n\u0103ng thay \u0111\u1ed5i prompt (d\u1ea5u nh\u1eafc l\u1ec7nh) \u0111\u1ec3 l\u00e0m cho terminal tr\u1edf n\u00ean d\u1ec5 s\u1eed d\u1ee5ng v\u00e0 \u0111\u1eb9p m\u1eaft h\u01a1n. B\u1ea1n c\u00f3 th\u1ec3 t\u00f9y ch\u1ec9nh m\u00e0u s\u1eafc v\u00e0 th\u00f4ng tin hi\u1ec3n th\u1ecb trong d\u1ea5u nh\u1eafc l\u1ec7nh.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">V\u00ed d\u1ee5:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">PS1=\"\\[\\e[32m\\]\\u@\\h:\\w\\$ \\[\\e[0m\\]\"\u00a0 # Thay \u0111\u1ed5i m\u00e0u ch\u1eef v\u00e0 hi\u1ec3n th\u1ecb t\u00ean ng\u01b0\u1eddi d\u00f9ng, m\u00e1y t\u00ednh v\u00e0 th\u01b0 m\u1ee5c hi\u1ec7n t\u1ea1i<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">Trong \u0111\u00f3:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">\\u<\/span><span style=\"font-weight: 400;\">: T\u00ean ng\u01b0\u1eddi d\u00f9ng<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">\\h<\/span><span style=\"font-weight: 400;\">: T\u00ean m\u00e1y t\u00ednh<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">\\w<\/span><span style=\"font-weight: 400;\">: Th\u01b0 m\u1ee5c l\u00e0m vi\u1ec7c hi\u1ec7n t\u1ea1i<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">M\u00e3 m\u00e0u <\/span><span style=\"font-weight: 400;\">[32m<\/span><span style=\"font-weight: 400;\"> thay \u0111\u1ed5i m\u00e0u ch\u1eef sang m\u00e0u xanh l\u00e1 c\u00e2y.<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">Sau khi l\u01b0u v\u00e0 t\u1ea3i l\u1ea1i <\/span><span style=\"font-weight: 400;\">.bashrc<\/span><span style=\"font-weight: 400;\">, b\u1ea1n s\u1ebd th\u1ea5y d\u1ea5u nh\u1eafc l\u1ec7nh hi\u1ec3n th\u1ecb v\u1edbi m\u00e0u s\u1eafc m\u1edbi.<\/span><\/p>\n<h4><b>Th\u00eam c\u00e1c l\u1ec7nh t\u1ef1 \u0111\u1ed9ng ch\u1ea1y khi m\u1edf Terminal<\/b><\/h4>\n<p><span style=\"font-weight: 400;\">T\u1eadp tin <\/span><span style=\"font-weight: 400;\">.bashrc<\/span><span style=\"font-weight: 400;\"> c\u0169ng c\u00f3 th\u1ec3 ch\u1ee9a c\u00e1c l\u1ec7nh t\u1ef1 \u0111\u1ed9ng ch\u1ea1y m\u1ed7i khi b\u1ea1n m\u1edf terminal. \u0110i\u1ec1u n\u00e0y gi\u00fap b\u1ea1n thi\u1ebft l\u1eadp m\u00f4i tr\u01b0\u1eddng ngay khi b\u1eaft \u0111\u1ea7u l\u00e0m vi\u1ec7c, ch\u1eb3ng h\u1ea1n nh\u01b0 k\u00edch ho\u1ea1t m\u1ed9t d\u1ecbch v\u1ee5, ch\u1ea1y c\u00e1c ki\u1ec3m tra ho\u1eb7c sao l\u01b0u h\u1ec7 th\u1ed1ng, hay thi\u1ebft l\u1eadp l\u1ea1i c\u00e1c bi\u1ebfn m\u00f4i tr\u01b0\u1eddng.<\/span><\/p>\n<p><b>V\u00ed d\u1ee5:<\/b><span style=\"font-weight: 400;\"> T\u1ef1 \u0111\u1ed9ng ch\u1ea1y l\u1ec7nh khi m\u1edf terminal:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\"># Ki\u1ec3m tra v\u00e0 th\u00f4ng b\u00e1o n\u1ebfu c\u00f3 b\u1ea3n c\u1eadp nh\u1eadt h\u1ec7 th\u1ed1ng<\/span>\r\n\r\n<span style=\"font-weight: 400;\">if [ $(apt list --upgradable 2&gt;\/dev\/null | grep -c upgradable) -gt 0 ]; then<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0echo \"C\u00f3 b\u1ea3n c\u1eadp nh\u1eadt m\u1edbi!\"<\/span>\r\n\r\n<span style=\"font-weight: 400;\">fi<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">V\u1edbi l\u1ec7nh tr\u00ean h\u1ec7 th\u1ed1ng s\u1ebd ki\u1ec3m tra xem c\u00f3 b\u1ea3n c\u1eadp nh\u1eadt n\u00e0o ch\u01b0a \u0111\u01b0\u1ee3c c\u00e0i \u0111\u1eb7t v\u00e0 hi\u1ec3n th\u1ecb th\u00f4ng b\u00e1o m\u1ed7i khi b\u1ea1n m\u1edf terminal.<\/span><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Cac_cau_hoi_thuong_gap_ve_cach_chay_Bash_shell_tren_Linux\"><\/span><b>C\u00e1c c\u00e2u h\u1ecfi th\u01b0\u1eddng g\u1eb7p v\u1ec1 c\u00e1ch ch\u1ea1y Bash shell tr\u00ean Linux<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><b>Bash shell c\u00f3 ph\u1ea3i l\u00e0 shell duy nh\u1ea5t c\u00f3 th\u1ec3 ch\u1ea1y tr\u00ean Linux kh\u00f4ng?<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Kh\u00f4ng, Bash shell kh\u00f4ng ph\u1ea3i l\u00e0 shell duy nh\u1ea5t c\u00f3 th\u1ec3 ch\u1ea1y tr\u00ean Linux. M\u1eb7c d\u00f9 Bash l\u00e0 shell ph\u1ed5 bi\u1ebfn nh\u1ea5t tr\u00ean Linux, nh\u01b0ng h\u1ec7 th\u1ed1ng Linux c\u00f2n h\u1ed7 tr\u1ee3 nhi\u1ec1u shell kh\u00e1c, bao g\u1ed3m:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Zsh<\/b><span style=\"font-weight: 400;\">: Shell c\u00f3 nhi\u1ec1u t\u00ednh n\u0103ng n\u00e2ng cao, h\u1ed7 tr\u1ee3 ho\u00e0n th\u00e0nh l\u1ec7nh m\u1ea1nh m\u1ebd v\u00e0 nhi\u1ec1u plugin h\u1eefu \u00edch.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Fish<\/b><span style=\"font-weight: 400;\">: Shell d\u1ec5 s\u1eed d\u1ee5ng v\u1edbi t\u00ednh n\u0103ng t\u1ef1 \u0111\u1ed9ng ho\u00e0n th\u00e0nh l\u1ec7nh v\u00e0 hi\u1ec3n th\u1ecb c\u00fa ph\u00e1p m\u00e0u s\u1eafc.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Ksh (Korn Shell)<\/b><span style=\"font-weight: 400;\">: Shell m\u1ea1nh m\u1ebd v\u1edbi kh\u1ea3 n\u0103ng x\u1eed l\u00fd c\u00e1c t\u1eadp l\u1ec7nh ph\u1ee9c t\u1ea1p.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Tcsh<\/b><span style=\"font-weight: 400;\">: Shell k\u1ebf th\u1eeba t\u1eeb C Shell, v\u1edbi c\u00e1c c\u1ea3i ti\u1ebfn nh\u01b0 t\u1ef1 \u0111\u1ed9ng ho\u00e0n th\u00e0nh v\u00e0 x\u1eed l\u00fd l\u1ecbch s\u1eed l\u1ec7nh.<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">Tuy nhi\u00ean, Bash v\u1eabn l\u00e0 l\u1ef1a ch\u1ecdn m\u1eb7c \u0111\u1ecbnh v\u00e0 ph\u1ed5 bi\u1ebfn nh\u1ea5t v\u00ec t\u00ednh \u1ed5n \u0111\u1ecbnh v\u00e0 d\u1ec5 s\u1eed d\u1ee5ng.<\/span><\/p>\n<h3><b>Bash c\u00f3 th\u1ec3 t\u01b0\u01a1ng th\u00edch v\u1edbi c\u00e1c ng\u00f4n ng\u1eef l\u1eadp tr\u00ecnh kh\u00e1c kh\u00f4ng?<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">C\u00f3, Bash c\u00f3 th\u1ec3 t\u01b0\u01a1ng th\u00edch v\u00e0 k\u1ebft h\u1ee3p v\u1edbi nhi\u1ec1u ng\u00f4n ng\u1eef l\u1eadp tr\u00ecnh kh\u00e1c nhau. B\u1ea1n c\u00f3 th\u1ec3 s\u1eed d\u1ee5ng Bash scripts \u0111\u1ec3 g\u1ecdi v\u00e0 th\u1ef1c thi c\u00e1c ch\u01b0\u01a1ng tr\u00ecnh vi\u1ebft b\u1eb1ng c\u00e1c ng\u00f4n ng\u1eef kh\u00e1c nh\u01b0 Python, Ruby, Perl, C v\u00e0 nhi\u1ec1u ng\u00f4n ng\u1eef kh\u00e1c. Bash c\u0169ng cho ph\u00e9p s\u1eed d\u1ee5ng c\u00e1c c\u00f4ng c\u1ee5 v\u00e0 th\u01b0 vi\u1ec7n t\u1eeb c\u00e1c ng\u00f4n ng\u1eef kh\u00e1c trong script c\u1ee7a m\u00ecnh th\u00f4ng qua vi\u1ec7c g\u1ecdi c\u00e1c l\u1ec7nh h\u1ec7 th\u1ed1ng ho\u1eb7c s\u1eed d\u1ee5ng c\u00e1c API ngo\u1ea1i vi.<\/span><\/p>\n<h3><b>L\u00e0m sao \u0111\u1ec3 debug m\u1ed9t Bash script?<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Vi\u1ec7c debug m\u1ed9t Bash script c\u00f3 th\u1ec3 \u0111\u01b0\u1ee3c th\u1ef1c hi\u1ec7n th\u00f4ng qua m\u1ed9t s\u1ed1 ph\u01b0\u01a1ng ph\u00e1p v\u00e0 c\u00f4ng c\u1ee5 h\u1ed7 tr\u1ee3.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">D\u01b0\u1edbi \u0111\u00e2y l\u00e0 m\u1ed9t s\u1ed1 c\u00e1ch \u0111\u01a1n gi\u1ea3n \u0111\u1ec3 debug:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>S\u1eed d\u1ee5ng <\/b><span style=\"font-weight: 400;\">set -x<\/span><b> \u0111\u1ec3 theo d\u00f5i l\u1ec7nh th\u1ef1c thi<\/b><span style=\"font-weight: 400;\">: Th\u00eam d\u00f2ng l\u1ec7nh <\/span><span style=\"font-weight: 400;\">set -x<\/span><span style=\"font-weight: 400;\"> v\u00e0o \u0111\u1ea7u script \u0111\u1ec3 Bash hi\u1ec3n th\u1ecb chi ti\u1ebft t\u1eebng l\u1ec7nh \u0111\u01b0\u1ee3c th\u1ef1c thi trong qu\u00e1 tr\u00ecnh ch\u1ea1y script.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>S\u1eed d\u1ee5ng <\/b><span style=\"font-weight: 400;\">set -v<\/span><b> \u0111\u1ec3 hi\u1ec3n th\u1ecb m\u00e3 ngu\u1ed3n<\/b><span style=\"font-weight: 400;\">: <\/span><span style=\"font-weight: 400;\">set -v<\/span><span style=\"font-weight: 400;\"> s\u1ebd hi\u1ec3n th\u1ecb n\u1ed9i dung c\u1ee7a c\u00e1c l\u1ec7nh khi script \u0111ang ch\u1ea1y, gi\u00fap b\u1ea1n hi\u1ec3u r\u00f5 h\u01a1n v\u1ec1 h\u00e0nh \u0111\u1ed9ng c\u1ee7a script.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Ki\u1ec3m tra m\u00e3 tho\u00e1t (exit status)<\/b><span style=\"font-weight: 400;\">: S\u1eed d\u1ee5ng <\/span><span style=\"font-weight: 400;\">$?<\/span><span style=\"font-weight: 400;\"> \u0111\u1ec3 ki\u1ec3m tra m\u00e3 tho\u00e1t c\u1ee7a l\u1ec7nh cu\u1ed1i c\u00f9ng. M\u1ed9t m\u00e3 tho\u00e1t kh\u00e1c 0 c\u00f3 th\u1ec3 ch\u1ec9 ra l\u1ed7i.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>S\u1eed d\u1ee5ng <\/b><span style=\"font-weight: 400;\">trap<\/span><b> \u0111\u1ec3 x\u1eed l\u00fd t\u00edn hi\u1ec7u l\u1ed7i<\/b><span style=\"font-weight: 400;\">: <\/span><span style=\"font-weight: 400;\">trap<\/span><span style=\"font-weight: 400;\"> gi\u00fap b\u1ea1n x\u1eed l\u00fd c\u00e1c l\u1ed7i ho\u1eb7c d\u1eebng script khi g\u1eb7p l\u1ed7i, c\u0169ng nh\u01b0 l\u00e0m s\u1ea1ch c\u00e1c t\u00e0i nguy\u00ean khi script k\u1ebft th\u00fac.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>In gi\u00e1 tr\u1ecb bi\u1ebfn \u0111\u1ec3 ki\u1ec3m tra:<\/b><span style=\"font-weight: 400;\"> Th\u00eam c\u00e1c c\u00e2u l\u1ec7nh echo \u0111\u1ec3 in gi\u00e1 tr\u1ecb c\u1ee7a c\u00e1c bi\u1ebfn t\u1ea1i c\u00e1c b\u01b0\u1edbc trong script, gi\u00fap b\u1ea1n d\u1ec5 d\u00e0ng ph\u00e1t hi\u1ec7n v\u1ea5n \u0111\u1ec1.<\/span><\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Tong_ket\"><\/span><b>T\u1ed5ng k\u1ebft<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">T\u00f3m l\u1ea1i, Bash shell kh\u00f4ng ch\u1ec9 l\u00e0 c\u00f4ng c\u1ee5 gi\u00fap ng\u01b0\u1eddi d\u00f9ng t\u01b0\u01a1ng t\u00e1c v\u1edbi h\u1ec7 th\u1ed1ng Linux m\u00e0 c\u00f2n h\u1ed7 tr\u1ee3 t\u1ef1 \u0111\u1ed9ng h\u00f3a, t\u00f9y ch\u1ec9nh v\u00e0 t\u1ed1i \u01b0u h\u00f3a quy tr\u00ecnh l\u00e0m vi\u1ec7c. Vi\u1ec7c hi\u1ec3u r\u00f5 c\u00e1c l\u1ec7nh c\u01a1 b\u1ea3n v\u00e0 c\u00e1ch c\u1ea5u h\u00ecnh Bash s\u1ebd gi\u00fap b\u1ea1n ti\u1ebft ki\u1ec7m th\u1eddi gian v\u00e0 n\u00e2ng cao hi\u1ec7u qu\u1ea3 c\u00f4ng vi\u1ec7c.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">ITviec hy v\u1ecdng b\u00e0i vi\u1ebft tr\u00ean \u0111\u00e3 cung c\u1ea5p cho b\u1ea1n nh\u1eefng ki\u1ebfn th\u1ee9c h\u1eefu \u00edch v\u00e0 gi\u00fap b\u1ea1n hi\u1ec3u r\u00f5 h\u01a1n v\u1ec1 c\u00e1ch s\u1eed d\u1ee5ng Bash shell hi\u1ec7u qu\u1ea3 tr\u00ean Linux. <\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>N\u1ebfu b\u1ea1n \u0111ang l\u00e0m vi\u1ec7c tr\u00ean h\u1ec7 \u0111i\u1ec1u h\u00e0nh Linux, Bash shell l\u00e0 m\u1ed9t c\u00f4ng c\u1ee5 kh\u00f4ng th\u1ec3 thi\u1ebfu. V\u1edbi kh\u1ea3 n\u0103ng th\u1ef1c hi\u1ec7n c\u00e1c l\u1ec7nh \u0111\u01a1n gi\u1ea3n \u0111\u1ebfn ph\u1ee9c t\u1ea1p v\u00e0 h\u1ed7 tr\u1ee3 t\u1ea1o c\u00e1c script t\u1ef1 \u0111\u1ed9ng h\u00f3a c\u00f4ng vi\u1ec7c, Bash mang l\u1ea1i nhi\u1ec1u l\u1ee3i \u00edch cho ng\u01b0\u1eddi d\u00f9ng trong vi\u1ec7c t\u1ed1i \u01b0u [&hellip;]<\/p>\n","protected":false},"author":209,"featured_media":87044,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_gspb_post_css":"","footnotes":""},"categories":[109],"tags":[],"class_list":["post-87024","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-chuyen-mon-it"],"blocksy_meta":[],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.8 (Yoast SEO v27.7) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>C\u00e1ch s\u1eed d\u1ee5ng Bash shell tr\u00ean Linux: T\u1eeb ch\u1ea1y l\u1ec7nh \u0111\u1ebfn t\u00f9y ch\u1ec9nh - ITviec Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/itviec.com\/blog\/cach-su-dung-bash-shell-tren-linux\/\" \/>\n<meta property=\"og:locale\" content=\"vi_VN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"C\u00e1ch s\u1eed d\u1ee5ng Bash shell tr\u00ean Linux: T\u1eeb ch\u1ea1y l\u1ec7nh \u0111\u1ebfn t\u00f9y ch\u1ec9nh\" \/>\n<meta property=\"og:description\" content=\"N\u1ebfu b\u1ea1n \u0111ang l\u00e0m vi\u1ec7c tr\u00ean h\u1ec7 \u0111i\u1ec1u h\u00e0nh Linux, Bash shell l\u00e0 m\u1ed9t c\u00f4ng c\u1ee5 kh\u00f4ng th\u1ec3 thi\u1ebfu. V\u1edbi kh\u1ea3 n\u0103ng th\u1ef1c hi\u1ec7n c\u00e1c l\u1ec7nh \u0111\u01a1n gi\u1ea3n \u0111\u1ebfn ph\u1ee9c t\u1ea1p v\u00e0 h\u1ed7 tr\u1ee3\" \/>\n<meta property=\"og:url\" content=\"https:\/\/itviec.com\/blog\/cach-su-dung-bash-shell-tren-linux\/\" \/>\n<meta property=\"og:site_name\" content=\"ITviec Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/ITviec\" \/>\n<meta property=\"article:published_time\" content=\"2025-05-17T15:09:01+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2016\/10\/homepage3-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"940\" \/>\n\t<meta property=\"og:image:height\" content=\"492\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"M\u1ef9 Duy\u00ean\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@ITviec\" \/>\n<meta name=\"twitter:site\" content=\"@ITviec\" \/>\n<meta name=\"twitter:label1\" content=\"\u0110\u01b0\u1ee3c vi\u1ebft b\u1edfi\" \/>\n\t<meta name=\"twitter:data1\" content=\"M\u1ef9 Duy\u00ean\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u01af\u1edbc t\u00ednh th\u1eddi gian \u0111\u1ecdc\" \/>\n\t<meta name=\"twitter:data2\" content=\"25 ph\u00fat\" \/>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"C\u00e1ch s\u1eed d\u1ee5ng Bash shell tr\u00ean Linux: T\u1eeb ch\u1ea1y l\u1ec7nh \u0111\u1ebfn t\u00f9y ch\u1ec9nh - ITviec Blog","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:\/\/itviec.com\/blog\/cach-su-dung-bash-shell-tren-linux\/","og_locale":"vi_VN","og_type":"article","og_title":"C\u00e1ch s\u1eed d\u1ee5ng Bash shell tr\u00ean Linux: T\u1eeb ch\u1ea1y l\u1ec7nh \u0111\u1ebfn t\u00f9y ch\u1ec9nh","og_description":"N\u1ebfu b\u1ea1n \u0111ang l\u00e0m vi\u1ec7c tr\u00ean h\u1ec7 \u0111i\u1ec1u h\u00e0nh Linux, Bash shell l\u00e0 m\u1ed9t c\u00f4ng c\u1ee5 kh\u00f4ng th\u1ec3 thi\u1ebfu. V\u1edbi kh\u1ea3 n\u0103ng th\u1ef1c hi\u1ec7n c\u00e1c l\u1ec7nh \u0111\u01a1n gi\u1ea3n \u0111\u1ebfn ph\u1ee9c t\u1ea1p v\u00e0 h\u1ed7 tr\u1ee3","og_url":"https:\/\/itviec.com\/blog\/cach-su-dung-bash-shell-tren-linux\/","og_site_name":"ITviec Blog","article_publisher":"https:\/\/www.facebook.com\/ITviec","article_published_time":"2025-05-17T15:09:01+00:00","og_image":[{"width":940,"height":492,"url":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2016\/10\/homepage3-1.png","type":"image\/png"}],"author":"M\u1ef9 Duy\u00ean","twitter_card":"summary_large_image","twitter_creator":"@ITviec","twitter_site":"@ITviec","twitter_misc":{"\u0110\u01b0\u1ee3c vi\u1ebft b\u1edfi":"M\u1ef9 Duy\u00ean","\u01af\u1edbc t\u00ednh th\u1eddi gian \u0111\u1ecdc":"25 ph\u00fat"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/itviec.com\/blog\/cach-su-dung-bash-shell-tren-linux\/#article","isPartOf":{"@id":"https:\/\/itviec.com\/blog\/cach-su-dung-bash-shell-tren-linux\/"},"author":{"name":"M\u1ef9 Duy\u00ean","@id":"https:\/\/itviec.com\/blog\/#\/schema\/person\/73733c0725c7e39e696a896bd1abe2d7"},"headline":"C\u00e1ch s\u1eed d\u1ee5ng Bash shell tr\u00ean Linux: T\u1eeb ch\u1ea1y l\u1ec7nh \u0111\u1ebfn t\u00f9y ch\u1ec9nh","datePublished":"2025-05-17T15:09:01+00:00","mainEntityOfPage":{"@id":"https:\/\/itviec.com\/blog\/cach-su-dung-bash-shell-tren-linux\/"},"wordCount":4718,"publisher":{"@id":"https:\/\/itviec.com\/blog\/#organization"},"image":{"@id":"https:\/\/itviec.com\/blog\/cach-su-dung-bash-shell-tren-linux\/#primaryimage"},"thumbnailUrl":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2025\/05\/bash-shell-linux-vippro-scaled.png","articleSection":["Chuy\u00ean m\u00f4n IT"],"inLanguage":"vi"},{"@type":"WebPage","@id":"https:\/\/itviec.com\/blog\/cach-su-dung-bash-shell-tren-linux\/","url":"https:\/\/itviec.com\/blog\/cach-su-dung-bash-shell-tren-linux\/","name":"C\u00e1ch s\u1eed d\u1ee5ng Bash shell tr\u00ean Linux: T\u1eeb ch\u1ea1y l\u1ec7nh \u0111\u1ebfn t\u00f9y ch\u1ec9nh - ITviec Blog","isPartOf":{"@id":"https:\/\/itviec.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/itviec.com\/blog\/cach-su-dung-bash-shell-tren-linux\/#primaryimage"},"image":{"@id":"https:\/\/itviec.com\/blog\/cach-su-dung-bash-shell-tren-linux\/#primaryimage"},"thumbnailUrl":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2025\/05\/bash-shell-linux-vippro-scaled.png","datePublished":"2025-05-17T15:09:01+00:00","inLanguage":"vi","potentialAction":[{"@type":"ReadAction","target":["https:\/\/itviec.com\/blog\/cach-su-dung-bash-shell-tren-linux\/"]}]},{"@type":"ImageObject","inLanguage":"vi","@id":"https:\/\/itviec.com\/blog\/cach-su-dung-bash-shell-tren-linux\/#primaryimage","url":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2025\/05\/bash-shell-linux-vippro-scaled.png","contentUrl":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2025\/05\/bash-shell-linux-vippro-scaled.png","width":640,"height":337,"caption":"bash shell tr\u00ean linux - itviec blog"},{"@type":"WebSite","@id":"https:\/\/itviec.com\/blog\/#website","url":"https:\/\/itviec.com\/blog\/","name":"ITviec Blog","description":"IT Jobs &amp; People in Vietnam","publisher":{"@id":"https:\/\/itviec.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/itviec.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"vi"},{"@type":"Organization","@id":"https:\/\/itviec.com\/blog\/#organization","name":"ITviec","url":"https:\/\/itviec.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"vi","@id":"https:\/\/itviec.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2018\/12\/itviec-black-square-facebook.png","contentUrl":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2018\/12\/itviec-black-square-facebook.png","width":1800,"height":1800,"caption":"ITviec"},"image":{"@id":"https:\/\/itviec.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/ITviec","https:\/\/x.com\/ITviec","https:\/\/www.linkedin.com\/company\/itviec","https:\/\/www.youtube.com\/channel\/UCYthAQ3bcGr57M_ag5gHDvQ"]},{"@type":"Person","@id":"https:\/\/itviec.com\/blog\/#\/schema\/person\/73733c0725c7e39e696a896bd1abe2d7","name":"M\u1ef9 Duy\u00ean","image":{"@type":"ImageObject","inLanguage":"vi","@id":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/03\/Author_Duyen-Tran-120x120.jpg","url":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/03\/Author_Duyen-Tran-120x120.jpg","contentUrl":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/03\/Author_Duyen-Tran-120x120.jpg","caption":"M\u1ef9 Duy\u00ean"},"url":"https:\/\/itviec.com\/blog\/author\/my-duyen\/"}]}},"_links":{"self":[{"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/posts\/87024","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/users\/209"}],"replies":[{"embeddable":true,"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/comments?post=87024"}],"version-history":[{"count":0,"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/posts\/87024\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/media\/87044"}],"wp:attachment":[{"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/media?parent=87024"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/categories?post=87024"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/tags?post=87024"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}