[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-1-en-105":3,"doc-seo-573359-105":53,"doc-detail-573359-en":126},{"code":4,"msg":5,"data":6},0,"success",[7,14,19,24,29,34,39,44,49],{"id":8,"doc_module":9,"doc_module_name":10,"category_name":11,"show_sort_weight":12,"slug":13},11,1,"Template","Presentations",90,"presentations",{"id":15,"doc_module":9,"doc_module_name":10,"category_name":16,"show_sort_weight":17,"slug":18},12,"Resumes",80,"resumes",{"id":20,"doc_module":9,"doc_module_name":10,"category_name":21,"show_sort_weight":22,"slug":23},14,"Invoices",70,"invoices",{"id":25,"doc_module":9,"doc_module_name":10,"category_name":26,"show_sort_weight":27,"slug":28},15,"Posters",60,"posters",{"id":30,"doc_module":9,"doc_module_name":10,"category_name":31,"show_sort_weight":32,"slug":33},16,"Social Media",50,"social-media",{"id":35,"doc_module":9,"doc_module_name":10,"category_name":36,"show_sort_weight":37,"slug":38},17,"Forms",40,"forms",{"id":40,"doc_module":9,"doc_module_name":10,"category_name":41,"show_sort_weight":42,"slug":43},18,"Letters",30,"letters",{"id":45,"doc_module":9,"doc_module_name":10,"category_name":46,"show_sort_weight":47,"slug":48},21,"Paper Templates",5,"papers-templates",{"id":50,"doc_module":9,"doc_module_name":10,"category_name":51,"show_sort_weight":4,"slug":52},158,"General","general-158",{"code":4,"msg":54,"data":55},"ok",{"site_id":56,"language":57,"slug":58,"title":59,"keywords":60,"description":61,"schema_data":62,"social_meta":119,"head_meta":121,"extra_data":123,"updated_unix":125},105,"en","bash-cheat-sheet-basic-commands-and-tips","BASH CHEAT SHEET - basic commands and tips","","BASH CHEAT SHEET by Tomi Mester provides a structured, beginner-friendly reference for using the command line with Bash. It explains the shell prompt elements, basic directory and file operations, and essential printing and counting commands (echo, cat, head/tail, wc with common flags). The guide also covers practical tips such as TAB autocompletion, command history navigation, and using options with examples and syntax.",{"@graph":63,"@context":118},[64,80,101],{"@type":65,"itemListElement":66},"BreadcrumbList",[67,71,74,77],{"item":68,"name":69,"@type":70,"position":9},"https://docshare.wps.com","Home","ListItem",{"item":72,"name":10,"@type":70,"position":73},"https://docshare.wps.com/template/",2,{"item":75,"name":11,"@type":70,"position":76},"https://docshare.wps.com/template/presentations/",3,{"item":78,"name":59,"@type":70,"position":79},"https://docshare.wps.com/template/bash-cheat-sheet-basic-commands-and-tips/573359/",4,{"url":78,"name":59,"@type":81,"image":82,"author":87,"headline":59,"publisher":90,"fileFormat":93,"inLanguage":57,"description":61,"dateModified":94,"datePublished":95,"encodingFormat":93,"isAccessibleForFree":96,"interactionStatistic":97},"DigitalDocument",{"url":83,"@type":84,"width":85,"height":86},"https://docshare.wps.com/thumbnails/bash-cheat-sheet-basic-commands-and-tips/573359.png","ImageObject",442,249,{"name":88,"@type":89},"Finn","Person",{"url":68,"name":91,"@type":92},"DocShare","Organization","application/pdf","2026-10-18","2026-10-14",true,{"@type":98,"interactionType":99,"userInteractionCount":73},"InteractionCounter",{"@type":100},"ViewAction",{"@type":102,"mainEntity":103},"FAQPage",[104,110,114],{"name":105,"@type":106,"acceptedAnswer":107},"What do the elements of the command line prompt show?","Question",{"text":108,"@type":109},"The prompt shows the user name, the @ symbol, the server name, the current folder (e.g., ~ for the home directory), and a $ sign. Commands are typed after the $ sign.","Answer",{"name":111,"@type":106,"acceptedAnswer":112},"How do I navigate directories in Bash using the cheat sheet?",{"text":113,"@type":109},"Use cd to move to your home directory, cd test_dir to enter a subfolder, cd .. to move up one level, and cd - to return to the previously visited folder.",{"name":115,"@type":106,"acceptedAnswer":116},"How can I count lines, words, and characters in a file?",{"text":117,"@type":109},"Use wc some_data.csv for lines, words, and characters. Add options like wc -l for lines, wc -w for words, and wc -c for characters.","https://schema.org",{"og:url":78,"og:type":120,"og:title":59,"og:site_name":91,"og:description":61},"article",{"robots":122,"canonical":78},"index,follow",{"doc_id":124,"site_id":56},573359,1792338319,{"code":4,"msg":5,"data":127},{"doc_id":124,"user_id":128,"nickname":88,"user_avatar":129,"doc_module":9,"category_id":8,"category_name":11,"doc_title":59,"doc_description":61,"doc_content":130,"file_id":131,"file_url":132,"file_type":133,"file_size":134,"view_count":73,"is_deleted":4,"is_public":9,"is_downloadable":9,"audit_status":9,"page_count":135,"language":136,"language_code":57,"site_id":56,"html_lang":57,"table_of_contents":137,"faqs":138,"seo_title":139,"seo_description":61,"update_tm":140,"read_time":141},34359740700684,"https://ap-avatar.wpscdn.com/avatar/1f400023980c374ae676?_k=1777273430885731487","BASH  \nCHEAT SHEET  \ncreated by Tomi Mester  \nI originally created this cheat sheet for my 6-week data science online course participants.* But I have decided to open-source it and make it available to everyone who wants to learn bash and the command line.  \nIt's designed to give you a meaningful structure but also to let you add your own notes (that's why the empty boxes are there) . It starts from the absolute basics ( cd ..) and includes everything that you will need as a junior data analyst/ scientist (commands, scripting, automations, etc.).  \nThe ideal use case of this cheat sheet is that you print it in color and keep it next to you while you are learning and practicing Bash on your computer.  \nEnjoy!  \nCheers,  \nTomi Mester  \n*The online courses I mentioned:  \nOnline command line and bash tutorial (free): [data36.com/bash-tutorial](data36.com/bash-tutorial)  \n6-week Data Science course: [data36.com/jds](data36.com/jds)  \n BASH CHEAT SHEET  \nTHE PROMPT  \nWhen working in the command line, at the beginning of every line you will see the prompt.  \nExample:  \ntomi@data36-learn-server:~$  \nIt's built from six elements:  \n• your user name (e.g. tomi)• @  \n• your server name ([e.g.](e.g. data36-learn-server)[ data36-learn-server](e.g. data36-learn-server))• :  \n• folder name (e.g. ~ which means your user's home directory)• $  \nYour commands go after the $ sign.  \nABOUT THE COMMAND LINE COMMANDS  \nIn the command line, you interact with your server exclusively by typing commands. You don't have a cursor or a graphical user interface.  \nA few commonalities of bash commands:  \n• They are usually created to do one simple thing and do that one thing very well.  \n• The name of the commands are almost always the short form of the things they do. (e.g. pwd stands for \"print working directory\".)  \n• Their original function can be modified with options. (More details later.)  \n[your notes]  \nCREATED BY TOMI MESTER | DATA36.COM 1  \n BASH CHEAT SHEET  \nBASIC DIRECTORY COMMANDS  \npwd  \nPrints the name of your current working directory.  \nls  \nLists all the content of your current working directory.  \ncd  \nYou move from your current working directory to your user's home directory. Note: cd stands for change directory.  \ncd test_dir  \nYou move to the test_dir directory- if test_dir exists in your current working directory.  \ncd ..  \nMoves up one folder.  \ncd -  \nMoves to the folder where you previously were.  \nmkdir one_more_dir  \nCreates a new directory called one_more_dir.  \nCREATED BY TOMI MESTER | DATA36.COM 2  \n BASH CHEAT SHEET  \nBASIC FILE COMMANDS  \ntouch test_file .txt  \nCreates an empty file called test_file.txt.  \ncp test_file .txt test_file_copy .txt  \nCopies your original test_file.txt and names the new copy to test_file_copy.txt.  \ncp test_file .txt one_more_dir/test_file .txt  \nCopies your original test_file.txt into the one_more_dir directory-and keeps its original name. (Only works if one_more_dir is in your current working directory.)  \nmv test_file .txt one_more_dir/test_file .txt  \nMoves your original test_file.txt into the one_more_dir directory.(Only works if one_more_dir is in your current working directory.)  \nmv test_file .txt test_file_some_new_name .txt  \nRenames your original test_file.txt to test_file_some_new_name.txt.  \nrm test_file .txt  \nRemoves the test_file.txt file- if it exists.  \nNote: Be careful! In bash, if you delete a file, it will be deleted for good. There's no\"Trash\" folder or \"Restore\" button in case you remove something by accident.  \nMore about the basics:  [https://data36.com/bash-basics](https://data36.com/bash-basics)  \nCREATED BY TOMI MESTER | DATA36.COM 3  \n BASH CHEAT SHEET  \nTIPS AND TRICKS  \n\\#1  \nclear  \nClears your terminal screen.  \n\\#2  \nYou can use the up (↑) and down (↓) arrows on your keyboard to bring back your previous commands.  \n\\#3  \nhistory  \nBrings back all your previously typed-in commands and prints them to your screen.  \n\\#4  \nHit the TAB key (→) on your keyboard to auto","cbCaisjUA9e4b7vK","https://ap.wps.com/l/cbCaisjUA9e4b7vK","pdf",3780718,19,"English","# The Prompt\n# About the Command Line Commands\n# Basic Directory Commands\n# Basic File Commands\n# Tips and Tricks\n# Printing\n# Counting\n# Options","[{\"question\":\"What do the elements of the command line prompt show?\",\"answer\":\"The prompt shows the user name, the @ symbol, the server name, the current folder (e.g., ~ for the home directory), and a $ sign. Commands are typed after the $ sign.\"},{\"question\":\"How do I navigate directories in Bash using the cheat sheet?\",\"answer\":\"Use cd to move to your home directory, cd test_dir to enter a subfolder, cd .. to move up one level, and cd - to return to the previously visited folder.\"},{\"question\":\"How can I count lines, words, and characters in a file?\",\"answer\":\"Use wc some_data.csv for lines, words, and characters. Add options like wc -l for lines, wc -w for words, and wc -c for characters.\"}]","BASH CHEAT SHEET - basic commands and tips | PDF",1791938000,7]