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.
Ok I am trying to view my bashrc file and am going crazy. I typed in ~/.bashrc and it tells me it is a directory and won't show me the directory or what it contains.
I am using virtual Fedora, would this be the reason or is it I am typing the wrong command. Is there a good place to learn these commands other than some cheesy ebook I downloaded? I copy and pasted the MAN but it is not helping me on the bashrc. I am sure I will like Linux but I sure hate it now. LOL I am ready to give up on it.
I looked here but it is not explaining this very well.http://www.giglig.com/technology/what-is-bashrc-file I think I need to take a class or something. This is frustrating me because all the commands seem to lead to nothing.
Yes, vi is an editor (there are many others as well, but vi is my preferred editor). cat is short for concatenate which displays the contents of a file. more will display the contents of a file as well, put it will pause at the end of each page and allow you to advance line-byline (by pressing enter) or advance a page at a time (by pressing the space bar).
This is a great community for learning how to use Linux....hang in there, we are here to help!
~/.bashrc is not a directory. And yes, if you don't have one you can create it using any text-editor you want (or if you want even with commands like echo).
Last edited by TobiSGD; 05-06-2013 at 02:12 AM.
Reason: fixed obvious nonsense caused by posting when tired
I doubt very much that it's a directory; that error was just an artifact of your previous mistaken command. bashrc is a text file, and yes, you can create one if it doesn't already exist.
vi (which is actually vim on Linux, it starts out in vi-compatibility mode), is a very complex mode-based text editor, and its style of workflow is almost certainly something you aren't used to. I highly recommend learning it, but the learning curve is very, very steep. You won't really be able to function effectively with it without several hours of training. Heck, most beginners can't even figure out how to close it again after they've started it ( type ":q!" ).
You can also run vimtutor when you're ready to learn.
But anyway, for beginners I recommend using nano instead, which is a more traditional cli text editor that has decent on-screen help. Or open it up in whatever gui editor you have available, like gedit or kwrite.
The vi cmd is usually aliased to the vim cmd. They are both editors: vim => vi Improved, basically more capable, but still contains all the vi cmds.
The learning curve can be a bit steep, BUT it (vi) is available/part of the default install in just about all versions of *nix (Linux, *BSD, HP-UX, Solaris, AIX, OS/X), so its worth learning the basics imho.
Ditto rescue environments will have vi built-in.
Dear computergirl121,
~/ is usually your home directory, so looking there for bashrc will not find it. Bashrc is in the /etc directory; so cd /etc followed by ls will show you all in the /etc directory, then 'cat' what is available to view it. You can then invoke a gui editor to change that file as root.
changing /etc/bashrc will force any changes to everyone that logs in. If you are only wanting to change the login for your personal profile, ~/.bashrc is the file you will want to change. This isn't a big issue on a personal machine at home, but it can be in the business world where many different users log into a specified machine.
The . in front of .bashrc makes it a hidden file, so you will not see it if you do an
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.