├── .devcontainer └── devcontainer.json ├── .github ├── CODEOWNERS ├── ISSUE_TEMPLATE.md ├── PULL_REQUEST_TEMPLATE.md └── workflows │ └── main.yml ├── .gitignore ├── .vscode └── settings.json ├── CONTRIBUTING.md ├── Exercise Files ├── departments │ ├── engineering │ │ ├── drawings │ │ │ └── .gitkeep │ │ ├── invoices │ │ │ └── .gitkeep │ │ └── materials │ │ │ └── .gitkeep │ ├── finance │ │ ├── documents │ │ │ └── .gitkeep │ │ ├── invoices │ │ │ └── .gitkeep │ │ └── spreadsheets │ │ │ └── .gitkeep │ ├── hr │ │ ├── candidates │ │ │ └── .gitkeep │ │ ├── employee info │ │ │ └── .gitkeep │ │ └── policies │ │ │ └── .gitkeep │ ├── marketing │ │ └── .gitkeep │ └── sales │ │ ├── affiliates │ │ └── .gitkeep │ │ ├── enterprise │ │ └── .gitkeep │ │ ├── presentations │ │ └── .gitkeep │ │ └── promotions │ │ └── .gitkeep ├── dupes.txt ├── log.tar.gz ├── poems.txt ├── simple_data.txt └── test.sh ├── LICENSE ├── NOTICE ├── README.md └── commands.md /.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- 1 | { 2 | "extensions": [ 3 | "GitHub.github-vscode-theme" 4 | ], 5 | "onCreateCommand": "echo PS1='\"$ \"' >> ~/.bashrc", 6 | "postAttachCommand": "git pull --all" 7 | } 8 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | # Codeowners for these exercise files: 2 | # * (asterisk) deotes "all files and folders" 3 | # Example: * @producer @instructor 4 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 7 | 8 | ## Issue Overview 9 | 10 | 11 | ## Describe your environment 12 | 13 | 14 | ## Steps to Reproduce 15 | 16 | 1. 17 | 2. 18 | 3. 19 | 4. 20 | 21 | ## Expected Behavior 22 | 23 | 24 | ## Current Behavior 25 | 26 | 27 | ## Possible Solution 28 | 29 | 30 | ## Screenshots / Video 31 | 32 | 33 | ## Related Issues 34 | 35 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: Copy To Branches 2 | on: 3 | workflow_dispatch: 4 | jobs: 5 | copy-to-branches: 6 | runs-on: ubuntu-latest 7 | steps: 8 | - uses: actions/checkout@v2 9 | with: 10 | fetch-depth: 0 11 | - name: Copy To Branches Action 12 | uses: planetoftheweb/copy-to-branches@v1 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | .tmp 4 | npm-debug.log 5 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.bracketPairColorization.enabled": true, 3 | "editor.cursorBlinking": "solid", 4 | "editor.fontFamily": "ui-monospace, Menlo, Monaco, 'Cascadia Mono', 'Segoe UI Mono', 'Roboto Mono', 'Oxygen Mono', 'Ubuntu Monospace', 'Source Code Pro', 'Fira Mono', 'Droid Sans Mono', 'Courier New', monospace", 5 | "editor.fontLigatures": false, 6 | "editor.fontSize": 22, 7 | "editor.formatOnPaste": true, 8 | "editor.formatOnSave": true, 9 | "editor.lineNumbers": "on", 10 | "editor.matchBrackets": "always", 11 | "editor.minimap.enabled": false, 12 | "editor.smoothScrolling": true, 13 | "editor.tabSize": 2, 14 | "editor.useTabStops": true, 15 | "emmet.triggerExpansionOnTab": true, 16 | "explorer.openEditors.visible": 0, 17 | "files.autoSave": "afterDelay", 18 | "screencastMode.onlyKeyboardShortcuts": true, 19 | "terminal.integrated.fontSize": 18, 20 | "workbench.activityBar.visible": true, 21 | "workbench.colorTheme": "Visual Studio Dark", 22 | "workbench.fontAliasing": "antialiased", 23 | "workbench.statusBar.visible": true 24 | } -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | 2 | Contribution Agreement 3 | ====================== 4 | 5 | This repository does not accept pull requests (PRs). All pull requests will be closed. 6 | 7 | However, if any contributions (through pull requests, issues, feedback or otherwise) are provided, as a contributor, you represent that the code you submit is your original work or that of your employer (in which case you represent you have the right to bind your employer). By submitting code (or otherwise providing feedback), you (and, if applicable, your employer) are licensing the submitted code (and/or feedback) to LinkedIn and the open source community subject to the BSD 2-Clause license. 8 | -------------------------------------------------------------------------------- /Exercise Files/departments/engineering/drawings/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LinkedInLearning/learning-linux-command-line-3005201/e0cfdc8244b804b57c04b5cffc55c0b322122457/Exercise Files/departments/engineering/drawings/.gitkeep -------------------------------------------------------------------------------- /Exercise Files/departments/engineering/invoices/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LinkedInLearning/learning-linux-command-line-3005201/e0cfdc8244b804b57c04b5cffc55c0b322122457/Exercise Files/departments/engineering/invoices/.gitkeep -------------------------------------------------------------------------------- /Exercise Files/departments/engineering/materials/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LinkedInLearning/learning-linux-command-line-3005201/e0cfdc8244b804b57c04b5cffc55c0b322122457/Exercise Files/departments/engineering/materials/.gitkeep -------------------------------------------------------------------------------- /Exercise Files/departments/finance/documents/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LinkedInLearning/learning-linux-command-line-3005201/e0cfdc8244b804b57c04b5cffc55c0b322122457/Exercise Files/departments/finance/documents/.gitkeep -------------------------------------------------------------------------------- /Exercise Files/departments/finance/invoices/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LinkedInLearning/learning-linux-command-line-3005201/e0cfdc8244b804b57c04b5cffc55c0b322122457/Exercise Files/departments/finance/invoices/.gitkeep -------------------------------------------------------------------------------- /Exercise Files/departments/finance/spreadsheets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LinkedInLearning/learning-linux-command-line-3005201/e0cfdc8244b804b57c04b5cffc55c0b322122457/Exercise Files/departments/finance/spreadsheets/.gitkeep -------------------------------------------------------------------------------- /Exercise Files/departments/hr/candidates/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LinkedInLearning/learning-linux-command-line-3005201/e0cfdc8244b804b57c04b5cffc55c0b322122457/Exercise Files/departments/hr/candidates/.gitkeep -------------------------------------------------------------------------------- /Exercise Files/departments/hr/employee info/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LinkedInLearning/learning-linux-command-line-3005201/e0cfdc8244b804b57c04b5cffc55c0b322122457/Exercise Files/departments/hr/employee info/.gitkeep -------------------------------------------------------------------------------- /Exercise Files/departments/hr/policies/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LinkedInLearning/learning-linux-command-line-3005201/e0cfdc8244b804b57c04b5cffc55c0b322122457/Exercise Files/departments/hr/policies/.gitkeep -------------------------------------------------------------------------------- /Exercise Files/departments/marketing/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LinkedInLearning/learning-linux-command-line-3005201/e0cfdc8244b804b57c04b5cffc55c0b322122457/Exercise Files/departments/marketing/.gitkeep -------------------------------------------------------------------------------- /Exercise Files/departments/sales/affiliates/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LinkedInLearning/learning-linux-command-line-3005201/e0cfdc8244b804b57c04b5cffc55c0b322122457/Exercise Files/departments/sales/affiliates/.gitkeep -------------------------------------------------------------------------------- /Exercise Files/departments/sales/enterprise/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LinkedInLearning/learning-linux-command-line-3005201/e0cfdc8244b804b57c04b5cffc55c0b322122457/Exercise Files/departments/sales/enterprise/.gitkeep -------------------------------------------------------------------------------- /Exercise Files/departments/sales/presentations/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LinkedInLearning/learning-linux-command-line-3005201/e0cfdc8244b804b57c04b5cffc55c0b322122457/Exercise Files/departments/sales/presentations/.gitkeep -------------------------------------------------------------------------------- /Exercise Files/departments/sales/promotions/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LinkedInLearning/learning-linux-command-line-3005201/e0cfdc8244b804b57c04b5cffc55c0b322122457/Exercise Files/departments/sales/promotions/.gitkeep -------------------------------------------------------------------------------- /Exercise Files/dupes.txt: -------------------------------------------------------------------------------- 1 | Here's a line of text. 2 | Here's a line of text. 3 | Text can be easy to work with. 4 | But some text can be tricky. 5 | Here's a line of text. 6 | Text can be easy to work with. 7 | -------------------------------------------------------------------------------- /Exercise Files/log.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LinkedInLearning/learning-linux-command-line-3005201/e0cfdc8244b804b57c04b5cffc55c0b322122457/Exercise Files/log.tar.gz -------------------------------------------------------------------------------- /Exercise Files/poems.txt: -------------------------------------------------------------------------------- 1 | Percy Shelley 2 | 3 | Ozymandias 4 | 5 | I met a traveller from an antique land 6 | Who said: Two vast and trunkless legs of stone 7 | Stand in the desert. Near them on the sand, 8 | Half sunk, a shatter'd visage lies, whose frown 9 | And wrinkled lip and sneer of cold command 10 | Tell that its sculptor well those passions read 11 | Which yet survive, stamp'd on these lifeless things, 12 | The hand that mock'd them and the heart that fed. 13 | And on the pedestal these words appear: 14 | "My name is Ozymandias, king of kings: 15 | Look on my works, ye Mighty, and despair!" 16 | Nothing beside remains: round the decay 17 | Of that colossal wreck, boundless and bare, 18 | The lone and level sands stretch far away. 19 | 20 | ~ ~ ~ 21 | 22 | William Blake 23 | 24 | The Tyger 25 | 26 | 27 | Tyger Tyger, burning bright, 28 | In the forests of the night; 29 | What immortal hand or eye, 30 | Could frame thy fearful symmetry? 31 | 32 | In what distant deeps or skies. 33 | Burnt the fire of thine eyes? 34 | On what wings dare he aspire? 35 | What the hand, dare seize the fire? 36 | 37 | And what shoulder, & what art, 38 | Could twist the sinews of thy heart? 39 | And when thy heart began to beat, 40 | What dread hand? & what dread feet? 41 | 42 | What the hammer? what the chain, 43 | In what furnace was thy brain? 44 | What the anvil? what dread grasp, 45 | Dare its deadly terrors clasp! 46 | 47 | When the stars threw down their spears 48 | And water'd heaven with their tears: 49 | Did he smile his work to see? 50 | Did he who made the Lamb make thee? 51 | 52 | Tyger Tyger burning bright, 53 | In the forests of the night: 54 | What immortal hand or eye, 55 | Dare frame thy fearful symmetry? 56 | -------------------------------------------------------------------------------- /Exercise Files/simple_data.txt: -------------------------------------------------------------------------------- 1 | Name ID Team 2 | Scott 314 Purple 3 | Ananti 991 Orange 4 | Jian 3127 Purple 5 | Miguel 671 Green 6 | Wes 1337 Orange 7 | Anne 556 Green 8 | -------------------------------------------------------------------------------- /Exercise Files/test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | echo -e "\n\tHello from the Test Script!\n" 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | LinkedIn Learning Exercise Files License Agreement 2 | ================================================== 3 | 4 | This License Agreement (the "Agreement") is a binding legal agreement 5 | between you (as an individual or entity, as applicable) and LinkedIn 6 | Corporation (“LinkedIn”). By downloading or using the LinkedIn Learning 7 | exercise files in this repository (“Licensed Materials”), you agree to 8 | be bound by the terms of this Agreement. If you do not agree to these 9 | terms, do not download or use the Licensed Materials. 10 | 11 | 1. License. 12 | - a. Subject to the terms of this Agreement, LinkedIn hereby grants LinkedIn 13 | members during their LinkedIn Learning subscription a non-exclusive, 14 | non-transferable copyright license, for internal use only, to 1) make a 15 | reasonable number of copies of the Licensed Materials, and 2) make 16 | derivative works of the Licensed Materials for the sole purpose of 17 | practicing skills taught in LinkedIn Learning courses. 18 | - b. Distribution. Unless otherwise noted in the Licensed Materials, subject 19 | to the terms of this Agreement, LinkedIn hereby grants LinkedIn members 20 | with a LinkedIn Learning subscription a non-exclusive, non-transferable 21 | copyright license to distribute the Licensed Materials, except the 22 | Licensed Materials may not be included in any product or service (or 23 | otherwise used) to instruct or educate others. 24 | 25 | 2. Restrictions and Intellectual Property. 26 | - a. You may not to use, modify, copy, make derivative works of, publish, 27 | distribute, rent, lease, sell, sublicense, assign or otherwise transfer the 28 | Licensed Materials, except as expressly set forth above in Section 1. 29 | - b. Linkedin (and its licensors) retains its intellectual property rights 30 | in the Licensed Materials. Except as expressly set forth in Section 1, 31 | LinkedIn grants no licenses. 32 | - c. You indemnify LinkedIn and its licensors and affiliates for i) any 33 | alleged infringement or misappropriation of any intellectual property rights 34 | of any third party based on modifications you make to the Licensed Materials, 35 | ii) any claims arising from your use or distribution of all or part of the 36 | Licensed Materials and iii) a breach of this Agreement. You will defend, hold 37 | harmless, and indemnify LinkedIn and its affiliates (and our and their 38 | respective employees, shareholders, and directors) from any claim or action 39 | brought by a third party, including all damages, liabilities, costs and 40 | expenses, including reasonable attorneys’ fees, to the extent resulting from, 41 | alleged to have resulted from, or in connection with: (a) your breach of your 42 | obligations herein; or (b) your use or distribution of any Licensed Materials. 43 | 44 | 3. Open source. This code may include open source software, which may be 45 | subject to other license terms as provided in the files. 46 | 47 | 4. Warranty Disclaimer. LINKEDIN PROVIDES THE LICENSED MATERIALS ON AN “AS IS” 48 | AND “AS AVAILABLE” BASIS. LINKEDIN MAKES NO REPRESENTATION OR WARRANTY, 49 | WHETHER EXPRESS OR IMPLIED, ABOUT THE LICENSED MATERIALS, INCLUDING ANY 50 | REPRESENTATION THAT THE LICENSED MATERIALS WILL BE FREE OF ERRORS, BUGS OR 51 | INTERRUPTIONS, OR THAT THE LICENSED MATERIALS ARE ACCURATE, COMPLETE OR 52 | OTHERWISE VALID. TO THE FULLEST EXTENT PERMITTED BY LAW, LINKEDIN AND ITS 53 | AFFILIATES DISCLAIM ANY IMPLIED OR STATUTORY WARRANTY OR CONDITION, INCLUDING 54 | ANY IMPLIED WARRANTY OR CONDITION OF MERCHANTABILITY OR FITNESS FOR A 55 | PARTICULAR PURPOSE, AVAILABILITY, SECURITY, TITLE AND/OR NON-INFRINGEMENT. 56 | YOUR USE OF THE LICENSED MATERIALS IS AT YOUR OWN DISCRETION AND RISK, AND 57 | YOU WILL BE SOLELY RESPONSIBLE FOR ANY DAMAGE THAT RESULTS FROM USE OF THE 58 | LICENSED MATERIALS TO YOUR COMPUTER SYSTEM OR LOSS OF DATA. NO ADVICE OR 59 | INFORMATION, WHETHER ORAL OR WRITTEN, OBTAINED BY YOU FROM US OR THROUGH OR 60 | FROM THE LICENSED MATERIALS WILL CREATE ANY WARRANTY OR CONDITION NOT 61 | EXPRESSLY STATED IN THESE TERMS. 62 | 63 | 5. Limitation of Liability. LINKEDIN SHALL NOT BE LIABLE FOR ANY INDIRECT, 64 | INCIDENTAL, SPECIAL, PUNITIVE, CONSEQUENTIAL OR EXEMPLARY DAMAGES, INCLUDING 65 | BUT NOT LIMITED TO, DAMAGES FOR LOSS OF PROFITS, GOODWILL, USE, DATA OR OTHER 66 | INTANGIBLE LOSSES . IN NO EVENT WILL LINKEDIN'S AGGREGATE LIABILITY TO YOU 67 | EXCEED $100. THIS LIMITATION OF LIABILITY SHALL: 68 | - i. APPLY REGARDLESS OF WHETHER (A) YOU BASE YOUR CLAIM ON CONTRACT, TORT, 69 | STATUTE, OR ANY OTHER LEGAL THEORY, (B) WE KNEW OR SHOULD HAVE KNOWN ABOUT 70 | THE POSSIBILITY OF SUCH DAMAGES, OR (C) THE LIMITED REMEDIES PROVIDED IN THIS 71 | SECTION FAIL OF THEIR ESSENTIAL PURPOSE; AND 72 | - ii. NOT APPLY TO ANY DAMAGE THAT LINKEDIN MAY CAUSE YOU INTENTIONALLY OR 73 | KNOWINGLY IN VIOLATION OF THESE TERMS OR APPLICABLE LAW, OR AS OTHERWISE 74 | MANDATED BY APPLICABLE LAW THAT CANNOT BE DISCLAIMED IN THESE TERMS. 75 | 76 | 6. Termination. This Agreement automatically terminates upon your breach of 77 | this Agreement or termination of your LinkedIn Learning subscription. On 78 | termination, all licenses granted under this Agreement will terminate 79 | immediately and you will delete the Licensed Materials. Sections 2-7 of this 80 | Agreement survive any termination of this Agreement. LinkedIn may discontinue 81 | the availability of some or all of the Licensed Materials at any time for any 82 | reason. 83 | 84 | 7. Miscellaneous. This Agreement will be governed by and construed in 85 | accordance with the laws of the State of California without regard to conflict 86 | of laws principles. The exclusive forum for any disputes arising out of or 87 | relating to this Agreement shall be an appropriate federal or state court 88 | sitting in the County of Santa Clara, State of California. If LinkedIn does 89 | not act to enforce a breach of this Agreement, that does not mean that 90 | LinkedIn has waived its right to enforce this Agreement. The Agreement does 91 | not create a partnership, agency relationship, or joint venture between the 92 | parties. Neither party has the power or authority to bind the other or to 93 | create any obligation or responsibility on behalf of the other. You may not, 94 | without LinkedIn’s prior written consent, assign or delegate any rights or 95 | obligations under these terms, including in connection with a change of 96 | control. Any purported assignment and delegation shall be ineffective. The 97 | Agreement shall bind and inure to the benefit of the parties, their respective 98 | successors and permitted assigns. If any provision of the Agreement is 99 | unenforceable, that provision will be modified to render it enforceable to the 100 | extent possible to give effect to the parties’ intentions and the remaining 101 | provisions will not be affected. This Agreement is the only agreement between 102 | you and LinkedIn regarding the Licensed Materials, and supersedes all prior 103 | agreements relating to the Licensed Materials. 104 | 105 | Last Updated: March 2019 106 | -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | Copyright 2021 LinkedIn Corporation 2 | All Rights Reserved. 3 | 4 | Licensed under the LinkedIn Learning Exercise File License (the "License"). 5 | See LICENSE in the project root for license information. 6 | 7 | Please note, this project may automatically load third party code from external 8 | repositories (for example, NPM modules, Composer packages, or other dependencies). 9 | If so, such third party code may be subject to other license terms than as set 10 | forth above. In addition, such third party code may also depend on and load 11 | multiple tiers of dependencies. Please review the applicable licenses of the 12 | additional dependencies. 13 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Learning Linux Command Line 2 | This is the repository for the LinkedIn Learning course Learning Linux Command Line. The full course is available from [LinkedIn Learning][lil-course-url]. 3 | 4 | ![Learning Linux Command Line][lil-thumbnail-url] 5 | 6 | Knowledge of the Linux command line is critical for anyone who uses this open-source operating system. For many tasks, it's more efficient and flexible than a graphical environment. For administrators, it plays a vital role in configuring permissions and working with files. In this course, experienced instructor Scott Simpson discusses the basics of setting up your environment and working with the Linux command line using the Bash shell. He focuses on practical Linux commands with examples that help you navigate through the file and folder structure, edit text, and set permissions. Scott also discusses some of the common command-line tools, such as grep, awk, and sed, and command-line apps such as the nano and Vim text editors. He covers output redirection and the PATH variable, then gives you a peek into more advanced topics. The course wraps up with a look at how to install and update software with a package manager. 7 | 8 | 9 | ### Instructor 10 | 11 | Scott Simpson 12 | 13 | Senior Staff Instructor 14 | 15 | 16 | 17 | Check out my other courses on [LinkedIn Learning](https://www.linkedin.com/learning/instructors/scott-simpson). 18 | 19 | [lil-course-url]: https://www.linkedin.com/learning/learning-linux-command-line-14447912?dApp=59033956&leis=LAA 20 | [lil-thumbnail-url]: https://media.licdn.com/dms/image/C4D0DAQGtr8J3i_BSjg/learning-public-crop_288_512/0/1679938026141?e=2147483647&v=beta&t=mAPlrEexRYjAzZqU1Em9kfv9N0pV3GNneO0bk-DdwDk 21 | -------------------------------------------------------------------------------- /commands.md: -------------------------------------------------------------------------------- 1 | # Commands used in __Learning Linux Command Line__ from LinkedIn Learning 2 | 3 | ## 01_01 - Creating a Linux virtual machine 4 | 5 | `sudo apt install gcc make perl` 6 | 7 | ## 02_03 - Write commands in a shell at the prompt 8 | 9 | `ls` 10 | 11 | `ls -l` 12 | 13 | `ls` 14 | 15 | `list` (invalid command) 16 | 17 | `jhsdgjhksad` (invalid command) 18 | 19 | ## 02_04 - Finding help for commands 20 | 21 | `man ls` 22 | 23 | `ls --help` 24 | 25 | `apropos list` 26 | 27 | ## 02_05 - Helpful keyboard shortcuts in the terminal 28 | 29 | `ls -l De` followed by the Tab key 30 | 31 | `ls -l Do` followed by the Tab key twice 32 | 33 | `ls -l Doc` followed by the Tab key 34 | 35 | `a` followed by the Tab key 36 | 37 | `clear` (used throughout the course) 38 | 39 | ## 03_01 - The Linux file system 40 | 41 | `ls -l` 42 | 43 | `file Documents` 44 | 45 | `stat Documents` 46 | 47 | ## 03_03 - Navigating the file system 48 | 49 | `cd Documents/` 50 | 51 | `pwd` 52 | 53 | `cd Exercise Files` (invalid command) 54 | 55 | `cd Exercise\ Files` 56 | 57 | `pwd` 58 | 59 | `ls` 60 | 61 | `ls -R departments/` 62 | 63 | `cd departments/hr/policies` 64 | 65 | `cd ..` 66 | 67 | `cd ..` 68 | 69 | `cd hr/policies` 70 | 71 | `cd ../../finance/documents` 72 | 73 | `cd -` 74 | 75 | `cd` 76 | 77 | ## 03_04 - Exploring the output of the ls command 78 | 79 | `ls` 80 | 81 | `ls --color=always` 82 | 83 | `cd Documents/Exercise\ Files` 84 | 85 | `ls -l` 86 | 87 | `ls -lh` 88 | 89 | ## 03_05 - Create and remove directories 90 | 91 | `mkdir newfolder` 92 | 93 | `ls -l` 94 | 95 | `mkdir departments/customerservice` 96 | 97 | `mkdir departments/customerservice/documents departments/customerservice/cases departments/customerservice/awards` 98 | 99 | `mkdir -p departments/legal/contracts` 100 | 101 | `rmdir departments/legal/contracts/` 102 | 103 | `rmdir departments/legal/` 104 | 105 | `rmdir departments/customerservice` 106 | 107 | ## 03_06 - Copy, move, and delete files and directories 108 | 109 | `cp poems.txt poems2.txt` 110 | 111 | `ls` 112 | 113 | `cp simple_data.txt departments/hr/employee\ info/` 114 | 115 | `ls departments/hr/employee\ info/` 116 | 117 | `mv poems2.txt departments/marketing` 118 | 119 | `ls departments/marketing/` 120 | 121 | `ls` 122 | 123 | `mv departments/marketing/poems2.txt departments/marketing/literature.txt` 124 | 125 | `ls departments/marketing/` 126 | 127 | `mv departments/marketing/literature.txt .` 128 | 129 | `ls` 130 | 131 | `ls` 132 | 133 | `mv *.txt departments/marketing/` 134 | 135 | `ls departments/marketing/` 136 | 137 | `mv departments/marketing/* .` 138 | 139 | `ls` 140 | 141 | `rm literature.txt` 142 | 143 | `ls` 144 | 145 | `cp poems.txt poems3.txt` 146 | 147 | `cp poems.txt poems4.txt` 148 | 149 | `ls` 150 | 151 | `rm poems?.txt` 152 | 153 | `ls` 154 | 155 | `rm departments/customerservice/` 156 | 157 | `rm -r departments/customerservice/` 158 | 159 | ## 03_07 - Find files from the command line 160 | 161 | `find . -name "poe*"` 162 | 163 | `find . -name "do*"` 164 | 165 | `find . -name "d*"` 166 | 167 | `find . -name "*d*"` 168 | 169 | `find ~/Documents -name "*d*"` 170 | 171 | ## 03_08 - Understand user roles and sudo 172 | 173 | `ls /root` 174 | 175 | `sudo ls /root` 176 | 177 | `sudo ls /root` 178 | 179 | `sudo -k` 180 | 181 | `sudo ls /root` 182 | 183 | `sudo -s` 184 | 185 | `exit` 186 | 187 | ## 03_10 - Modify file permissions 188 | 189 | `ls` 190 | 191 | `./test.sh` 192 | 193 | `ls -l test.sh` 194 | 195 | `stat test.sh` 196 | 197 | `chmod 644 test.sh` followed by Ctrl+C 198 | 199 | `chmod -x test.sh` 200 | 201 | `./test.sh` 202 | 203 | `bash test.sh` 204 | 205 | `cat test.sh` 206 | 207 | `chmod u-r test.sh` 208 | 209 | `chmod 244 test.sh` followed by Ctrl+C 210 | 211 | `cat test.sh` 212 | 213 | `chmod 755 test.sh` 214 | 215 | `./test.sh` 216 | 217 | `cat test.sh` 218 | 219 | `touch newfile` 220 | 221 | `stat newfile` 222 | 223 | `ls -l` 224 | 225 | `nano test.sh` 226 | 227 | `sudo chown root test.sh` 228 | 229 | `nano test.sh` 230 | 231 | `ls -l test.sh` 232 | 233 | `sudo chown [username] test.sh` (replace `[username]` with your user name) 234 | 235 | ## 03_11 - Create hard and symbolic links 236 | 237 | `ln -s poems.txt writing.txt` 238 | 239 | `ls -l` 240 | 241 | `cat writing.txt` 242 | 243 | `ln poems.txt words.txt` 244 | 245 | `ls -l` 246 | 247 | ## 04_02 - Use pipes to connect commands together 248 | 249 | `echo "Hello"` 250 | 251 | `echo "Hello" | wc` 252 | 253 | `echo "Hello world from the command line" | wc` 254 | 255 | ## 04_03 - View text files with cat, head, tail, and less 256 | 257 | `cat poems.txt` 258 | 259 | `head poems.txt` 260 | 261 | `head -n5 poems.txt` 262 | 263 | `tail -n3 poems.txt` 264 | 265 | `cat poems.txt | cat -n | tail -n5` 266 | 267 | `cat poems.txt | tail -n5 | cat -n` 268 | 269 | `less poems.txt` 270 | 271 | `cat poems.txt | less` 272 | 273 | ## 04_04 - Search for text in files and streams with grep 274 | 275 | `grep "the" poems.txt` 276 | 277 | `grep -n "the" poems.txt` 278 | 279 | `grep -n "The" poems.txt` 280 | 281 | `grep -in "The" poems.txt` 282 | 283 | `grep -vi "the" poems.txt``grep -E "\w{6.}" poems.txt` 284 | 285 | ## 04_05 - Manipulate text with awk, sed, and sort 286 | 287 | `cat simple_data.txt` 288 | 289 | `awk '{print $2}' simple_data.txt` 290 | 291 | `awk '{print $2 "\t" $1}' simple_data.txt` 292 | 293 | `awk '{print $2 "\t" $1}' simple_data.txt | sort -n` 294 | 295 | `cat simple_data.txt` 296 | 297 | `sort simple_data.txt` 298 | 299 | `sort -k2 simple_data.txt` 300 | 301 | `cat dupes.txt` 302 | 303 | `sort -u dupes.txt` 304 | 305 | ## 04_06 - Edit text with Vim 306 | 307 | `vi` 308 | 309 | `vi poems.txt` 310 | 311 | ## 04_07 - Edit text with nano 312 | 313 | `nano` 314 | 315 | `nano poems.txt` 316 | 317 | ## 04_08 - Working with tar and zip archives 318 | 319 | `cd ..` 320 | 321 | `tar -cvf myfiles.tar Exercise\ Files/` 322 | 323 | `ls -l` 324 | 325 | `tar -caf myfiles.tar.gz Exercise\ Files/` 326 | 327 | `tar -caf myfiles.tar.bz2 Exercise\ Files/` 328 | 329 | `ls -lh` 330 | 331 | `mkdir unpack1` 332 | 333 | `mv myfiles.tar.bz2 unpack1/` 334 | 335 | `cd unpack1/` 336 | 337 | `tar -xf myfiles.tar.bz2` 338 | 339 | `ls -l` 340 | 341 | `cd Exercise\ Files` 342 | 343 | `ls` 344 | 345 | `cd ~/Documents/` 346 | 347 | `mkdir unpack2` 348 | 349 | `tar -xf myfiles.tar.gz -C unpack2` 350 | 351 | `ls unpack2` 352 | 353 | `zip -r exfiles.zip Exercise\ Files/` 354 | 355 | `ls -lh` 356 | 357 | `mkdir unpack3` 358 | 359 | `mv exfiles.zip unpack3` 360 | 361 | `cd unpack3` 362 | 363 | `unzip exfiles.zip` 364 | 365 | `ls -l` 366 | 367 | `cd ..` 368 | 369 | `mkdir unpack4` 370 | 371 | `unzip unpack3/exfiles.zip -d unpack4` 372 | 373 | `ls -l unpack4` 374 | 375 | ## 04_11 - Output redirection 376 | 377 | `cd Exercise\ Files` 378 | 379 | `ls` 380 | 381 | `ls 1> filelist.txt` 382 | 383 | `cat filelist.txt` 384 | 385 | `ls > filelist2.txt` 386 | 387 | `cat filelist2.txt` 388 | 389 | `ls notreal` 390 | 391 | `ls notreal > filelist3.txt` 392 | 393 | `ls notreal 2> filelist4.txt` 394 | 395 | `cat filelist4.txt` 396 | 397 | `>filelist4.txt` 398 | 399 | `cat filelist4.txt` 400 | 401 | `ls > filelist5.txt` 402 | 403 | `echo "some appended text" >> filelist5.txt` 404 | 405 | `cat filelist5.txt` 406 | 407 | ## 04_12 - Exploring environment variables and PATH 408 | 409 | `env` 410 | 411 | `echo $PATH` 412 | 413 | `which ls` 414 | 415 | `which less` 416 | 417 | `ls -a` 418 | 419 | `nano ~/.bash_profile` 420 | 421 | ## 05_01 - Find information about your Linux distribution 422 | 423 | `ls -l /etc/*release` 424 | 425 | `cat /etc/lsb-release` 426 | 427 | `cat /etc/os-release` 428 | 429 | `cat /etc/*release` 430 | 431 | `uname -a` 432 | 433 | `uname -r` 434 | 435 | ## 05_02 - Find system hardware and disk information 436 | 437 | `free -h` 438 | 439 | `cat /proc/cpuinfo` 440 | 441 | `lscpu` 442 | 443 | `df -h` 444 | 445 | `sudo du -hd1 /` 446 | 447 | `sudo lshw | less` 448 | 449 | `ip a` 450 | 451 | ## 05_03 - Install and update software with a package manager 452 | 453 | `apt search tree` 454 | 455 | `apt show tree` 456 | 457 | `tree` 458 | 459 | `sudo apt update` 460 | 461 | `sudo apt install tree` 462 | 463 | `tree` 464 | 465 | `man tree` 466 | 467 | `sudo apt update` 468 | 469 | `sudo apt upgrade` --------------------------------------------------------------------------------