Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 10-05-2009, 02:00 PM   #1
LQ Newbie
Registered: Oct 2009
Posts: 2

Rep: Reputation: 0
Thumbs up create, edit, or view a file in Linux

Hi Friends
Plz Guide: How to I open, create, edit, or view a file in Linux?
Old 10-05-2009, 02:26 PM   #2
Registered: Jul 2005
Distribution: Fedora fc4, fc7, Mandrake 10.1, mandriva06, suse 9.1, Slackware 10.2, 11.0, 12.0,1,2 (Current)]
Posts: 732

Rep: Reputation: 30
it depends :
With GUI which is probably what you want :
use text editor like kate, or similar. you can start them from gui or from terminal line (while in X).
from terminal, you should use the easiest editor you want, probably for windows users will be nano.
I personally use for both ways vim.
also, another editor is emacs.

emacs or vim are very strong editors, google them for more advices.
Old 10-05-2009, 02:48 PM   #3
Registered: Nov 2006
Location: Slovenia
Distribution: Slackware 13.37
Posts: 511

Rep: Reputation: 37
touch filename - to create a file
To view the file:
cat filename
echo filename
To edit the filename you'll need to use a editor, like:
nano filename
vi filename
vim filename
emacs filename
There are more, but I don't know many CLI text editors cuz I'm in love with vim :$
Old 10-05-2009, 03:27 PM   #4
Registered: Sep 2006
Location: USA - NYC
Distribution: Whatever icon you see!
Posts: 642

Rep: Reputation: 57
Originally Posted by Harmain View Post
Hi Friends
Plz Guide: How to I open, create, edit, or view a file in Linux?
You need to be more specific. Is the file an ascii text, binary text file, a media file or other.

From the file Manger
If you're not sure which application to open the file with, just right-click on the file and select open with and a list of applications associated with file types will be shown.

If opening/editing files from the terminal, you can try these popular programs.

For ascii and binary text files: vim, nano, emacs, Kate, cat

audio and video files: ffmpeg, ffplay, mplayer, mencoder

images: display, convert

Of course there are many others, but these are the popular ones.

Visit for a list of windows to linux equivalents.

Hope this helps...

Last edited by dv502; 10-05-2009 at 04:35 PM.
Old 10-05-2009, 06:26 PM   #5
Registered: Sep 2009
Distribution: Fedora
Posts: 835

Rep: Reputation: 102Reputation: 102
Originally Posted by Harmain View Post
Hi Friends
Plz Guide: How to I open, create, edit, or view a file in Linux?
Please add this to your message:

This is homework.

That way, we know you are an honest person.
Old 10-05-2009, 09:05 PM   #6
Registered: Feb 2003
Location: Florida
Distribution: Fedora 18
Posts: 862

Rep: Reputation: 91
Lot of complex, confusing answers here for a noob. I'll just tell you what I use. If it's a txt file, view with "less", edit with "joe". If it's a multimedia file view with "mplayer". I don't think you're gonna be viewing or editing any binary files since you're a noob -- don't try. The aforementioned apps have to be run from a command line, look in your menu for something like "Terminal" or "Konsole", type in the appropriate command followed by the file name and hit enter. Ctl-h will give you some help in "joe". "q" will quit in "less" and "mplayer". You may have to install mplayer from your repo or install disc(s). A GUI multimedia player is Totem. You'll have to find and download the codecs for these multimedia players to play mp3s or DVDs.
If it's an office file like "somefile.doc" use suite of apps, like OpenOffice.Org "Writer", you'll find it in your menu.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Need help create a bash script to edit CSV File imkornhulio Programming 13 02-05-2009 11:23 AM
LXer: Decompile .chm file to view as html file under Linux LXer Syndicated Linux News 0 01-28-2007 02:03 AM
How can I View/Edit/Explore a motherboard bios file? Tectron1 Programming 5 12-19-2006 11:11 AM
Mutli file view/edit facility bgeddy Slackware 2 10-20-2006 05:33 PM
edit or view jmdlcar Slackware 1 08-12-2005 08:43 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:37 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration