Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I am new to linux and the command line. I am using VirtualBox with linux/ubuntu and needed to open my httpd.conf file to add the following:
ServerName localhost
Now I am stuck here and cannot figure out how to save this and go back to the command line. I know this is easy for the pros but I am completely new at this.
Thanks!
P.S. I searched Google and stackoverflow as I was sure this would have already been answered but I could not find anything on it.
Here is the screen shot.
http://i451.photobucket.com/albums/qq235/tech0925/asdfsafsf_zps80a61cd1.png
You can open your file for example with vi
vi /path/to/your/httpd.conf
after the file is open you can change to edit/insert modus of vi
:i
and edit your file. After editing you cann write and close your file
:wq
//edit:
you can store your file with nano (your editor)
CTRL+x
yes
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I want to open file in linux 321716~~Amstredam Hero - Jimmy to Worker'''s Comp Waiver.pdf´ in linux. How can I open this file , i try ´ls - la 321716~~Amstredam Hero - Jimmy to Worker'''s Comp Waiver.pdf
It's not working ,please help
I think your question was formatted in a way that messed with the styling, but you should be able to just enclose the filename with " " or possibly you could type the start of it and use * like cat name* and it would cat every file in that directory starting with "name"
Are you aware that most UNIX-like terminals have a kind of intellisense feature? You just start by typing some characters, you type ESC two times and the terminal tries to complete the filename. This should help you with your problem.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
Using gedit, I want to create a config.env file, how do I change the extension as simply naming it config.env doesn't work.
THanks in advance
It really doesn't matter what the file extension is, as long as it is in a linux machine.
Just execute file <filename> to know the file type.
However you could try this:
Save the file as it is like config.txt or other and execute the below command
mv config.txt config.env
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
I was trying to place my bash file to the bin, but i copied the contents to the .bashrc file, replacing the contents of the original file. I would like you to help me get back the .bashrc file.
You cannot recover your custom .bashrc. But, if you want to restore it to the default .bashrc, you will find the one copied when creating a new user in:
/etc/skel/.bashrc
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
I am editing a file using vim. I want to open another file (which currently exists) from within the same vim session and split my screen doing so. I want it to be read-only because I don't want to risk accidentally editing it.
If I try :sp another_file.txt, it opens it in read/write mode.
How do I do this?
:view command is what you are looking for. It opens buffer in readonly mode.
You can try :sv file.txt to open file in split window.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I need answers for those questions:
How and where can I change default app in user profile in Linux?
How can I save changes in vi editor without exiting? I guess it's w q q! but I'm not sure.
How and where can I change default app in user profile in Linux?
I guess you refer to the editor. If so, use the following:
export EDITOR=vi #or whatever other editor
To make it permanent, add this line to the .bashrc file in the home of the user, that is in ~/.bashrc.
How can I save changes in vi editor without exiting? I guess it's w q q! but I'm not sure.
use :w to save. You have to be in the command mode (go there pushing Esc).