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! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
10-27-2007, 02:06 AM
|
#1
|
Member
Registered: Oct 2007
Location: Philippines / Pilipinas
Distribution: FedoraCore5 :: Debian Etch
Posts: 37
Rep:
|
how to open *.conf files in linux terminal
Hello everyone^^,
I have a little problem with opening a file for example, a squid.conf file in a linux terminal..
if i am in windows and for example the squid.conf is at c:\squid\squid.conf, i would just type in the commandd prompt:
c: <enter>
cd squid <enter>
squid.conf <enter>
then the squid.conf will appear in a text editor(notepad).
...I tried the same in linux terminal(konsole) and the file wont open..
if someone can show me, i would be very greatful...
~ryan
|
|
|
10-27-2007, 02:15 AM
|
#2
|
Member
Registered: Sep 2007
Location: St. Catharines, Ontario
Distribution: Slackware 15/64 bit
Posts: 139
Rep:
|
try cd squid then pico|vi|nano squid.conf vi editor is most popular I believe pico is my personal preference.
|
|
|
10-27-2007, 02:41 AM
|
#3
|
Member
Registered: Oct 2007
Location: Philippines / Pilipinas
Distribution: FedoraCore5 :: Debian Etch
Posts: 37
Original Poster
Rep:
|
KrazyKanuk,
thanks for your kind reply, i will try your suggestion.
~ryan^^
|
|
|
10-27-2007, 02:50 AM
|
#4
|
Member
Registered: Oct 2007
Location: Philippines / Pilipinas
Distribution: FedoraCore5 :: Debian Etch
Posts: 37
Original Poster
Rep:
|
krazykanuk,
yes your suggestion worked thanks!...
but i had a problem with editing the conf file.
how do i open it with gEdit? (also using the linux terminal)
~ryan
|
|
|
10-27-2007, 02:53 AM
|
#5
|
Senior Member
Registered: Jun 2003
Location: California
Distribution: Slackware
Posts: 1,181
Rep:
|
Regardless of what editor you'd like to use, you should be able to view it by typing the editor's name and then the filename, for example:
Code:
$ pico testfile.conf
$ vi testfile.conf
$ mcedit testfile.conf
$ gedit testfile.conf
And so on (the '$' represents the prompt).
|
|
|
10-27-2007, 02:58 AM
|
#6
|
Member
Registered: Sep 2007
Location: St. Catharines, Ontario
Distribution: Slackware 15/64 bit
Posts: 139
Rep:
|
I would think start gedit then goto File then Open the file won't be listed because it is hidden (hence the period at the beginning of the filename) but if you have a place where you can type in a location or filename you can open it like that. I don't have gedit so I can't check to make sure. Using the terminal is easy just "vi /path to squid.conf/squid.conf" (without quotes).
|
|
|
10-27-2007, 05:56 AM
|
#7
|
Member
Registered: Oct 2007
Location: MI
Distribution: Debian Slackware
Posts: 528
Rep:
|
Also if you just want to view a files content use the cat command,like so cat /path/file.conf if the file is a large file pipe it to less or more like so cat /path/file.name | less or cat /path/file.name | more
But if you need to make changes to the file, as others have said use your favorite editor.
|
|
|
10-27-2007, 06:15 AM
|
#8
|
Member
Registered: Oct 2007
Location: Philippines / Pilipinas
Distribution: FedoraCore5 :: Debian Etch
Posts: 37
Original Poster
Rep:
|
thank you very much for all your replies!
i now understand how to open and change! yey!
~warmest thanks
~~Ryan^^
|
|
|
All times are GMT -5. The time now is 05:49 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|