openSUSE Forums > Archives > SF Archives > ARCHIVES - Software » Setting Paths For Programs

Go Back   openSUSE Forums > Archives > SF Archives > ARCHIVES - Software
Forums FAQ Members List Search Today's Posts Mark Forums Read


ARCHIVES - Software Questions about use, installation, or configuration of software running on SUSE Linux

 
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 22-May-2008, 15:30
CyToG
Guest
 
Posts: n/a
Thumbs up

What is the linux equivalent to the old windows

Code:
c:\>set path=
command? I remember one could place a whole bunch of these in the autoexec.bat file to make programs faster in dos without having to change directories.

-----------

The problem I am having with opensuse 10.1 is I am trying to use executables, scripts, and files and end up spending about 10-30 minutes trying to remember how I made it work the last time.

Example of my thought process in action based on what I am familiar with and what seems intuitive:

Code:
cytog@linux:~>ifconfig
Bash: ifconfig: command not found
At this point I want to search for the file from the console using the find command. After searching the internet for about 10 minutes I find something that explains this command better than the "man" document.

I learn that I have to use the "-name" argument. After trying to search for the name, I get a slew of access denied messages. I am running as a user instead of root because I am trying to get away from running as root all the time. It turns out, after 5 more minutes of searching, that I need to add the string "2>/dev/null" to get rid of these messages.

Code:
cytog@linux:~>find / -name ifconfig 2>/dev/null
/sbin/ifconfig
cytog@linux:~>cd /sbin
cytog@linux:/sbin>ifconfig
bash: ifconfig: command not found
cytog@linux:/sbin>/sbin/ifconfig
Finally! I know what my IP address is and I got ifconfig to run.

I wish I could just type "ifconfig" and have it work instead of "/sbin/ifconfig". Now I know ifconfig is a simple example but consider the case that I have a file down 6-7 directorys deep. To redo my example, I would rather type "coolwidget" and have my program work instead of needing to type "/home/cytog/Desktop/programstotry/graphics/CoolWidgetThingieSoft/bin/coolwidget".

What can I do to establish file paths?






  #2 (permalink)  
Old 22-May-2008, 16:37
swerdna
Guest
 
Posts: n/a
Default

You're just gonna have to use su to get to root if you want to avoid the long paths. Root has a different path allocation than ordinary users have, on purpose so things aren't too easy to call unconsciously
  #3 (permalink)  
Old 22-May-2008, 18:13
ken_yap
Guest
 
Posts: n/a
Default

A quick way to get some useful commands in your path is to to symlink them to your own bin directory:

ln -s /sbin/ifconfig ~/bin/
  #4 (permalink)  
Old 23-May-2008, 09:45
CyToG
Guest
 
Posts: n/a
Default

Quote:
ln -s /sbin/ifconfig ~/bin/[/b]
Perfect! Thank you.
That is just what I needed.

Is a symbolic link similar to a "window's shortcut"?
 

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




 

Search Engine Friendly URLs by vBSEO 3.3.0 RC2