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.
You can't. If the file is not in your current directory, you must specify a path. If you use the absolute path you can run that command from any place in the directory tree. If you use a relative path you have to know the position of the file in respect of your current directory. For example:
Code:
$ cd
$ pwd
/home/timk
$ cmp Documents/abc.txt Documents/acd.txt
You can spare typing the full or relative path of the commands (if they are in a place included in the PATH environment variable) but for files you have always to tell the system where the files are. The unique search path for files is the current directory, whereas for executables (commands) the search path can have multiple directories (as specified by echo $PATH).
This makes perfect sense now, and I can understand this from the setup process of various Linux apps.
It's interesting that the terminal in Ubuntu is defaulted to $ , however Puppy and Knoppix are in root with #, but I suppose the programmers of each application had something different in mind, with Puppy and Knoppix more suited to being used as live cds.
No, as pointed out the default prompt char/string is '$' if you are not root, '#' if you are root.
However you can customise it if you want (google "linux PS1").
This makes perfect sense now, and I can understand this from the setup process of various Linux apps.
It's interesting that the terminal in Ubuntu is defaulted to $ , however Puppy and Knoppix are in root with #, but I suppose the programmers of each application had something different in mind, with Puppy and Knoppix more suited to being used as live cds.
I don't know about Knoppix, but in Puppy you are always root.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.