LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 08-08-2016, 12:52 PM   #16
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled

Good catch grail.
 
Old 08-08-2016, 12:58 PM   #17
actinide
Member
 
Registered: Jan 2012
Posts: 333

Original Poster
Rep: Reputation: Disabled
Sorry don't know how to edit the ~/.bashrc.

All I did was copy and paste ~/.bashrc. into gedit and thats it.

There was no mistake concerning alias command. Examples came from watching a tutorial.
Ubuntu Linux. I used gedit

Last edited by actinide; 08-08-2016 at 01:06 PM.
 
Old 08-08-2016, 01:20 PM   #18
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 10,008

Rep: Reputation: 3193Reputation: 3193Reputation: 3193Reputation: 3193Reputation: 3193Reputation: 3193Reputation: 3193Reputation: 3193Reputation: 3193Reputation: 3193Reputation: 3193
Quote:
There was no mistake concerning alias command.
If the above statement is true, then everything you wrote in post #9 never happened. Here is the information from post #9 just to clarify:
Code:
alias mmc ='macchanger-gtk'

output bash: No command 'mmc' found, did you mean:

No command 'mmc' found, did you mean:
Command 'mc' from package 'mc' (universe)
Command 'mzc' from package 'racket' (universe)
Command 'qmc' from package 'qmc' (universe)
Command 'mic' from package 'mic2' (universe)
Command 'moc' from package 'qtchooser' (main)
Command 'mm' from package 'multimail' (universe)
Command 'mpc' from package 'mpc' (universe)
Command 'mmv' from package 'mmv' (universe)
Command 'mmg' from package 'mkvtoolnix-gui' (universe)
Command 'imc' from package 'italc-management-console' (universe)
Command 'zmc' from package 'zoneminder' (universe)
Command 'mmd' from package 'mtools' (main)
Command 'wmc' from package 'wine1.6' (universe)
Command 'smc' from package 'smc' (universe)
mmc: command not found
ALL the information in red indicates you typed the alias in incorrectly.

So if the above did not happen, again, please supply what steps you have followed?

As for gedit, ~/.bashrc is a shortened version of /home/<username>/.bashrc .... this is the path you need to follow
 
Old 08-08-2016, 01:24 PM   #19
actinide
Member
 
Registered: Jan 2012
Posts: 333

Original Poster
Rep: Reputation: Disabled
Ok.

Step 1 - Typed alias mmc='macchanger-gtk'

step 2 - ouput nothing

step 3 - started terminal typed mmc output
No command 'mmc' found, did you mean:
Command 'mm' from package 'multimail' (universe)
Command 'zmc' from package 'zoneminder' (universe)
Command 'mmd' from package 'mtools' (main)
Command 'mmg' from package 'mkvtoolnix-gui' (universe)
Command 'mmv' from package 'mmv' (universe)
Command 'imc' from package 'italc-management-console' (universe)
Command 'qmc' from package 'qmc' (universe)
Command 'mpc' from package 'mpc' (universe)
Command 'moc' from package 'qtchooser' (main)
Command 'mc' from package 'mc' (universe)
Command 'mic' from package 'mic2' (universe)
Command 'wmc' from package 'wine1.6' (universe)
Command 'smc' from package 'smc' (universe)
Command 'mzc' from package 'racket' (universe)
mmc: command not found
 
Old 08-08-2016, 02:10 PM   #20
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 10,008

Rep: Reputation: 3193Reputation: 3193Reputation: 3193Reputation: 3193Reputation: 3193Reputation: 3193Reputation: 3193Reputation: 3193Reputation: 3193Reputation: 3193Reputation: 3193
You need to run the command from the same terminal as you created the alias. Like with previous explanation of not working for another user, when the alias command is run at the command line it is only effective on that terminal (this is why others have been advising you to update .bashrc file to make it permanently available to all your environments).

So the first step is to confirm it works as desired in your current terminal. Once you can run it at will and are happy with outcome, you will need to edit the .bashrc file found in your home directory.
By the way, this also assumes you are running under a bash shell and not dash (you can check with echo $SHELL for result)
 
1 members found this post helpful.
Old 08-08-2016, 02:33 PM   #21
actinide
Member
 
Registered: Jan 2012
Posts: 333

Original Poster
Rep: Reputation: Disabled
Where abouts is the .bashrc file in the Home Directory.
 
Old 08-08-2016, 02:36 PM   #22
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
Quote:
Originally Posted by grail View Post
Once you have edited the file you need a new login to test if it has worked and generally you can simply open a new terminal to test that.
Or run the following:
Code:
source ~/.bashrc
 
Old 08-08-2016, 02:39 PM   #23
actinide
Member
 
Registered: Jan 2012
Posts: 333

Original Poster
Rep: Reputation: Disabled
Ok found the .bashrc file in /etc/bash.bashrc is this right.
 
Old 08-08-2016, 02:45 PM   #24
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
They are asking you to modify your .bashrc in your home directory. The '.' means it is hidden from normal view. If you want to see it then use:

Code:
ls -al
By using your favorite editor you can edit it. Try
Code:
cd ~
nano -w .bashrc
 
Old 08-08-2016, 02:48 PM   #25
actinide
Member
 
Registered: Jan 2012
Posts: 333

Original Poster
Rep: Reputation: Disabled
Done that now waht
 
Old 08-08-2016, 02:55 PM   #26
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
If you are using this under Ubuntu why not just use the menu command? I assume that you can select macchanger-gtk from the menu? I ask because I think you'll likely use something like gtksu to run a GUI command as root and if macchanger-gtk does what it seems to say it does then you will need to run it with root permissions.
So, why are you trying to run macchanger-gtk from a terminal?
 
Old 08-08-2016, 02:57 PM   #27
actinide
Member
 
Registered: Jan 2012
Posts: 333

Original Poster
Rep: Reputation: Disabled
The GUI doesn't show up, I have to type macchanger-gtk into the terminal then a box appears asking for
permission then type password.
 
Old 08-08-2016, 03:02 PM   #28
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
If you can work out how to add something to the Ubuntu menu system you might want to add "gksu macchanger-gtk" so that you're asked for a password in the GUI.
Otherwise see above for answers to the alias issues. The main one I see being that you need to run the application as root.
 
Old 08-08-2016, 03:06 PM   #29
actinide
Member
 
Registered: Jan 2012
Posts: 333

Original Poster
Rep: Reputation: Disabled
If macchanger-gtk can be added to the mint menu it sounds alot easier than the the terminal.
How can be done.
 
Old 08-08-2016, 03:12 PM   #30
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Quote:
Originally Posted by actinide View Post
If macchanger-gtk can be added to the mint menu it sounds alot easier than the the terminal.
How can be done.
Right-click the menu and select "Edit Menu" then add an entry for "gksu macchanger-gtk", perhaps? Sorry, I'm not running either of the common Mint DEs to confirm that it will work just like that but it ought to be similar.
Mint really ought to add it to the menu like that with an "as root" comment or something but it seems that Debian doesn't so, perhaps, they want you to think about things before you use it regularly (there's an automatic option when you install though, that I notice).
It's probably worth just typing sudo macchanger-gtk looking at what this does.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
bash: command works at command line, but not via an alias porphyry5 Programming 3 03-17-2012 02:48 PM
tar command alias command rlg Linux - Newbie 0 03-11-2008 07:21 AM
directory for alias command ernestk Linux - Server 1 08-30-2007 05:56 PM
Use for the alias command Metablade Linux - Newbie 4 10-12-2005 05:44 PM
alias command zeviddalop Linux - Newbie 3 01-12-2005 09:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration