Learn About Computers

Teaching about Computers

    15. Open Files from Terminal



    Posts : 63
    Join date : 2018-03-24

    15. Open Files from Terminal

    Post by Aof on Mon May 21, 2018 12:49 am

    15. Open Files from Terminal
    Navigate to the folder which has the files you wish to open.
    1. firefox filename.extension = is the format you would use to open a file with firefox, you can run many different filetypes from it, such as videos, pictures, and probably a few audio files.
    2. xdg-open 1.png = opens a PNG image with the default image viewer.
    3. nano thetextfile\ example.txt = opens a file called "thetextfile example.txt" in the nano editor.
    4. nano 'thetextfile example.txt' = opens a file with nano editor.
    5. firefox thetextfile\ example.txt = opens the file using firefox.
    6. cat thetextfile\ example.txt = lists the file's content from within the terminal.
    7. leafpad thetextfile\ example.txt = opens with leafpad editor.
    8. cat 'thetextfile example.txt' = lists the file's contents from within the terminal.
    9. Note: If I just right click on a video file and open it, it will open it using the default video player from Linux.
    10. I can close out the video player, type "top" in the terminal, then open the video player and look for new processes that come up to find the command name needed to start that program from the terminal.
    11. totem 1opent.webm = opens a file called 1opent.webm using the default linux player called totem.
    12. nautilus . = opens the current directory in a graphical interface point & click folder.
    13. Ctrl+C = if you can't get it to exit, or if the terminal gets stuck by opening nautilus from it.
    14. nautilus .. = opens one directory back from your present working directory.

      Current date/time is Thu Aug 16, 2018 11:28 am