How do I open, create, edit, and view a file in Linux?
There are different commands that can be used to open, create, edit, or view a file in Linux. Below is a listing of each of these commands. Click on the link for each of these commands to get additional information about that command.
Note: Some variants of Linux may not include all of the commands below. For example, the pico command is often not included in many default installations.
View a file
Open, create, and edit a file
The following commands are also capable of viewing a file.
For users new to Linux or familiar with MS-DOS, we highly recommend using the pico command to create and edit text files. Below is an example of pico that could be used to create a file in Linux.
In the above example, assuming the file "myfile.htm" does not exist, pico would open a blank edit page for myfile.htm. If this file did exist, pico would open any text that file contains.