I successfully edited the .bashrc file to get ruby version manager (rvm) working. Now I would like to turn that setting into an alias so that if i type the word 'ruby' into the terminal it not only goes to the rvm settup but also defaults to my webdev folder which is in my user home directory and also exicutes a command that will open up gedit ready to be used as the text editor for editing the .rb files. Can this be done i would settle for some added code for the 'if then' statement: so far it looks like this:
[Code]...
I don't want to mess with the default setup on this system too much and think things could get out of hand if i am not careful. So am cautious about doing anything at this stage. I wonder if it is possibel thought to setup that whole 'if then' statement as an 'alias'. I read a few referances to alias and looked in the manual like any good newby should but am needing your help please. getting out of the MSwindows mind set and into the linux logic is not so easy but is a great experience
I've set up an alias in .bashrc (let's call it alias1), and am trying to set up a sudo NOPASSWD rule for that particular command. So far, I've attempted: user ALL = NOPASSWD: alias1 user ALL=(ALL) NOPASSWD: alias1 But keep getting told I have a syntax error - presumably this is because visudo doesn't recognise alias1? I've already checked that alias1 works correctly, so I assume I'm just referring to it incorrectly.
After saving above changes, I enter the command: source ~/.bashrc Now if I do echo $PATH, the path shows both the old PLAY_HOME and new PLAY_HOME. This is really bad and messes up a lot of things in my project. This problem only goes away if I logout or reboot, a rather very long process. What is happening is that the old path is added to new path element and the old path includes the old path element you want to remove.
Using netbook asus 1005ha with lucid beta 1 with most of updates on learning to use the CLI and headaches cd command does not seem to reconise directories here is a sample
Code:
yeh i know read the f#####g manual i am but any help would be greatly accepted tried sudo with same commands same problem did have a problem on my debian system that was to do with paths this is not the same on a different footnote anyone thinking of upgrading to lucid sit tight on 9.10 there are still to many issues that need ironing out for a system that is your main system.
I am getting the following errors continuously whenever I update/save a config file in /etc/
Code:
error: line 29136: bad flag vector alias error: line 29137: bad flag alias index: 0
The config file got updated though. I am just worried that this may be something bad.I update the files using the command sudo gedit <config_file>. I haven't encountered this before in Karmic. Has anyone encountered the same error messages? This might be a problem with gedit. I tried doing the following and the error messages also came up:
1. In terminal, gedit foo.txt
2. In gedit, type anything and save
3. Terminal will show the following:
Code:
... ... error: line 19234: bad flag vector alias
[code]....
Running artha from the terminal also causes the error.I've managed to get the top-most line of the error:
error: line 15: bad flag alias index: 0 error: line 15: bad flag vector alias
The hardest thing about this is I have no idea what's causing it. I thought it was gedit but running artha (from the terminal) also causes the error.Sigh. This is a clean install of Lucid, which again makes it even harder to know what causes it.
I wanted to run a little media server in my house, shared with my laptop only, so I could free up space on my laptop drive. I took one of my Linux boxes out of my render farm and loaded up a minimal install, command line only of Ubuntu Lucid from the mini ISO (32 bit). I had to plug in a lan cable to install, but I wanted to move my box back out to the "farm" that doesn't have wired access to my intranet.
After much research, trial and error, this is what worked for me. My wireless card uses an Atheros AR5001X+ chip, and it works with the desktop cd out of the box. I found the "just works" desktop install uses the ath5k driver that is now included in Lucid, but I'm not using a desktop or window manager. I haven't tried this on server version, if you do, let others know what you had to install to get it to work.
The things I do tell you about, I instruct you as if you are a newbie, however I have left out some things that users should know or be able to lookup easily, like if you want a static address instead of using dhcp. You may not need all of the steps or you may have to do more research and troubleshooting.
Find your wireless card (you may need to lookup what to do if it is not recognized at all)List all pci devices, only show network devices (-v verbose, -vv very verbose): >>lspci -vv | grep Network List all hardware (| less lets you pause at each page - arrow keys, page down/up to navigate, q to quit) >>lshw | less
I tried to set up an alias for update, upgrade and clean by putting this line into my .bach.rc file
Code: #alias ud= 'aptitude update && sudo aptitude upgrade && sudo aptitude dist-upgrade && sudo aptitude autoclean' but when I type ud I get this error message, by the way I tried the bash.rc entry both commented and uncommented with the same result.
Some of my short cut keys seem not ot be working. Ex Alt +F2 dose not open a pop up command line. Also would like to add some short cuts. Like Ctrl + Alt+ Backspace for reboot. I went to the short cut app and I can add a short cut key, name it, but can't seem to figure out how to assign it a function. Didn't seem intuitive to me. I'm using the UNE version on a asus eel 1000.
i've gotten my fedora 12 to the point where i can run python3 scripts from command line and can call up python 2.6.2 idle with the command 'idle' from command line. what command will call up python3 (3.1.2 to be exact) idle?
I am trying to get my standard PS/2 Wheel mouse working on the Console command line, and seem to be having major problems getting it to work.
For the record, I am NOT talking about X, Xterm's or any Graphical Interface, my mouse wheel works fine in these environments.
I am purely concerned with getting the mouse wheel to work on the Console.
After many hours of reading forum posts about getting the wheel to work on the Console, this is what I have tried to date:
1. I have downloaded and installed every version of gpm I could find in the hope that one would utilise the wheel. (No Success).
2. I compiled and installed the latest version of gpm stable (1.20.6) to see if the wheel would work with it. (No Success).
3. I have tried setting up gpm-1.20.6 as a repeater to X, using every string I could find (msc, ms3, pnp .. etc), as well as every /dev entry in xorg.conf /dev/mouse, /dev/input/mice/, dev/gpmdata/, /dev/psaux ... etc). (No Success).
4. Created directories and configured a gpm.conf to both /etc/ and /etc/conf.d/ in the hope that gpm was looking for them there (read that in one forum or another). (No Success).
5. I then tried to find mouse wheel patches for gpm, and then downloaded the relevant version source gpm.***.tar.gz to go with these patches. Nearly every single one of the patches failed to apply (using patch -p1 >), except for one version I tried that did apply ... but then failed to make (stating that the source had a different signedness or some such thing) ??? (No Success).
6. I looked into IMwheel, but that seemed to be a purely X program that was a lazy way of writing ZAxisMapping in xorg.conf. (No Success).
So now I am stumped ... Does anyone know if if is possible to get:
a). A Wheel Mouse Patch for a recent version of gpm (1.20.6) that will actually apply, and then make?
b). A prepackaged recent version of gpm-1.20.6.tgz that has been patched to enable the wheel that I can use?
c). Any other information that may enable the mouse wheel to start working on the console.
I have an alias that I would like to use both as a regular user and as root, via sudo. Specifically, it is this:
alias rm=trash This works fine as a normal user, and it works fine when I use sudo -i to get a root shell prompt, but if I use sudo rm, the alias does not apply. So where do I need to put my alias so that it works in one-off sudo commands?
I used the alias command to make ll be ll -lrt. I have linux 5 and using the bash shell. now I can't even use ll, only ls. when I go into the bin directory, ll is not in the list and the normal color codes for bash are not showing either...folders blue, etc
In my .bashrc file, I am attempting to set JAVA_PATH to a local path, using the HOME environment variable or '~' symbol as shown in the following examples.Using ${HOME}
When I attempt to use ${JAVA_HOME} in a my ${PATH} javec is not found. To debug it, I tried a simple ls command:
ls ${JAVA_HOME}
and get the following error:
ls: ${HOME}/Software/java/jdk1.6.0_24/: No such file or directory
Using '~': Trying to use '~' symbol as follows:
export JAVA_PATH='~/Software/java/jdk1.6.0_24'
the ls command results in the same error, however javac is found.I prefer the '~' symbol anyway, but would like to understand why the ls command does not work for either, and why it seems as though ${HOME} is not being expanded.
When at the command line, I find that I have to type out this command very often: find . -iname "*php" -exec grep -H query {} ; I'd love to set up an alias, script, or shortcut to make it work easier. I would like to do something like: mysearch query ("*php") (.) It would be great if the command could accept three arguments, in reverse order:
query string, file name expression, directory If the second two arguments were omitted they would default to not being included, and the current directory. Finally, the icing on the cake would be that if additional variables were included (4th, 5th, 6th...) they would be injected as additional arguments for the find command (like I could say -type d) at the end. Attempted code I tried the example below, but I'm still having trouble setting default values. What am I doing wrong?
I know that using alias I can run a whole command with a shortcut. But my requirement is to use parts of a long command and in between I have to pass some user defined values. E.g. Suppose I have to routinely copy a directory to another remote directory on a remote machine.The remote machine name is quite long as well as the directory path to which I want to copy the files into.So the command to do scp would look like this[URL]Now I want to do some sort of aliasing (say "ecp") so that I just need to pass the source_directory name and the ecp command and do my job
I have a program which mounts /dev/sdb1 for which I lack the source code. This device does not exist on my RedHat 9 system and I want to create /dev/sdb1 such that it's an alias for /dev/hdb1 Can I do this? with MAKEDEV?
I need to have an alias which will allow it to mount, not create a symbolic link to an already mounted directory. i.e. 'mount /dev/sdb1 /mnt/harddrive' should actually mount /dev/hdb1
Whilst I have used GUI-based Linux distros for the last few years, I am now struggling somewhat when it comes to setting up a server from the command line. All the howto's I've read so far tell you how to set up certain things, but I don't know what I actually need to set up.Rather than asking the same questions all over again on a forum like this, and generally being a bit of a noob, I wonder if there's a resource somewhere that someone could direct me to in order to know what I need to do to set up a fileserver.
The hardware is all done, and I will probably set up a router distro like IpCop to manage the network, but I'm rather lost as to what packages I need, and how to know what the server is/isn't doing.I've used plenty of command lines in the past (ms dos, amiga dos, BASIC programming etc), just not a linux command line. All I've ever done is mount a few drives, use nmap and started x
I know my way around MS Windows much better, but I just don't feel right trying to program something for Android on a Microsoft operating system. I am interested in Android programming so I followed the instructions on [URL] to install the environment on my computer...
I just installed the JDK, SDK, Eclipse successfully (or I assume):
* When I get to Step 4 where I'm supposed to run 'android' it will not run. I get the error message "android: command not found" (I am definitely in the right directory).
** When I double-click it in nautilus, it opens up in gedit. I can set the permissions in nautilus (through the properties - Allow executing file as a program) and get it to work,
how to pass something more than a one-command startup for gnome-terminal. I will give an example of what I'm trying to do here:
Code:
#! /bin/bash # #TODO write this for gnome and xterm
[code]....
This same error occurs if the gnome-terminal line is changed to
Code:
gnome-terminal -e mcTerm
Is there any way to pass more than one command on to gnome-terminal? I have tried various single and double quoting senarios and in a final attempt, I abstracted to an exported function all to no avail. Perhaps even though gnome-term is better at many things than xterm, xterm trumps it in this instance.
I have installed IDL 7.1 on my Ubuntu 9.10. And now the instruction says that I should set up an "alias" for it.I do not know what to write in my "bashrc" as an alias for IDL. These are the place of the executable command of IDL:
/IDL/idl-7.1/bin/idl AND /IDL/idl-7.1/bin/idlde
Note that "idl" and "idlde" are the executable files which run the program by typing them in Terminal. I would be very grateful if anyone could help me in how to write an "alias" for my IDL.