Linux - NewbieThis 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.
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.
1. about the VI i don't know, when i want to edit a file or make a file i just type
Code:
vi filename
2. about the character set, don't know, because when i type letters, it shows just fine (but i'm from belgium, so we don't have special characters)
3. you copy text into a file you're editing like, select the text you want to copy, hit CTRL+C and when you are in the VI press the RIGHT MOUSE BUTTON. anyways, this works for me
4.you create a file with
[QUOTE=runeveryday;4352823]today, i begin to learn linux, i think it's a dear diary meoment.now i want someone to help me with the following questions.
1,i access my server via secureCRT, when i typed the
Code:
vim
in it, it shows
Code:
-bash: vim: command not found
. how to install the vim? my linux version is centos.
2, when i typed some chinese characters in VI, it shows unnormal. maybe i should set the default character to UTF-8. but i don't know how to set it.
3,i want to copy a html file code to VI, how do i do?
Quote:
4,how to create a file. like this?
Code:
mkdir filename
?
That will obviously create a directory.
To create an empty file, use the "touch" command. Also, opening an editor with the name of a non-existant file will usually create it.
Quote:
how to rename the file, which i created by VI and had some contents in the file.
As per post #5, in most distros, the vi cmd is aliased to vim (different to a symlink). HOWEVER, vi is usually also actually installed as well. Try 'which vi' to find it if you really want vi not vim. Or try 'which vim' and search the reported dir for vi.
If CentOS behaves like Fedora, running vi will get you a minimal version of vim, whereas running vim gets you the full-blown editor. One obvious difference is syntax highlighting - vim does it; vi doesn't.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.