Skip to main content
  
    
      
         Alpha
            
            This lesson is in the alpha phase, which means that it has been taught once and lesson authors are iterating on feedback.
          
            
              
              Alpha
            
            This lesson is in the alpha phase, which means that it has been taught once and lesson authors are iterating on feedback.
          
        
       
     
    
   
  
  The Unix Shell (pilot)
      
        
        
  
    
        
        
- The shell gives you the ability to work more efficiently by using
keyboard commands rather than a GUI.
- Useful commands for navigating your file system include:
ls,pwd, andcd.
- Most commands take options (flags) which begin with a
-.
- Tab completion can reduce errors from mistyping and make work more
efficient in the shell.
- The /,~, and..characters
represent important navigational shortcuts.
- Hidden files and directories start with .and can be
viewed usingls -a.
- Relative paths specify a location starting from the current
location, while absolute paths specify a location from the root of the
file system.
- You can view file contents using less,cat,headortail.
- The commands cp,mv, andmkdirare useful for manipulating existing files and
creating new directories.
- You can view file permissions using ls -land change
permissions usingchmod.
- The historycommand and the up arrow on your keyboard
can be used to repeat recently used commands.
- 
grepis a powerful search tool with many options for
customization.
- 
>,>>, and|are
different ways of redirecting output.
- 
command > fileredirects a command’s output to a
file.
- 
command >> fileredirects a command’s output to a
file without overwriting the existing contents of the file.
- 
command_1 | command_2redirects the output of the first
command as input to the second command.
- 
forloops are used for iteration.
- 
basenamegets rid of repetitive parts of names.