Views: 
              2,689β
          
          
                Votes:  2β
          
          
          
            
            Tag : 
              
                command-line  
              
          
          
            
              
                
                Link: 
                  π See Original Answer on Ask Ubuntu β§ π
              
            
          
        
        
          
            URL: 
              https://askubuntu.com/q/889683
          
          
            
            Title: 
              Why are . and .. are output as a hidden files when we do ls -a?
            
          
          
            ID: 
              /2017/03/05/Why-are-.-and-/Why-are-.-and-..-are-output-as-a-hidden-files-when-we-do-ls-a_
            
          
          
            Created: 
               March  5, 2017
          
          
               Edited:  March  5, 2017
          
          
          
            
            Upload: 
              October 19, 2025
          
          
               Layout:  post
          
          
            
            TOC: 
              false
          
          
               Navigation:  false
          
          
               Copy to clipboard:  false
          
          
        
       
In MS-DOS and Windows there are also . and ... Quite simply . represents the current directory and .. represents the parent directory.
MS-DOS was born from CPM operating system when Bill Gates bought rights for $80,000 and licensed to IBM as PC-DOS which turned into MS-DOS which turned into Windows which is predicted to land him a Trillion Dollars in the end.
Linux also uses . and .. as the first file system version was based on IBM PC-AT hardware.
As Serg answered in Linux . and .. donβt appear in ls command because any file beginning with . is a hidden file. You can use the ll alias to see these files though.
In both MS-DOS and Linux you can use cd .. command to change to the parent directory. In Linux when you want to call a command in the current directory (not in the path) you need to prefix the command with ./. In MS-DOS however it will automatically look in the current directory for the command before searching the PATH.
Apple Mac and Google Android are based on the Linux operating system but I donβt know if their file systems also use . and ...