LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 03-03-2017, 08:52 AM   #1
actinide
Member
 
Registered: Jan 2012
Posts: 323

Rep: Reputation: Disabled
Alias command not working


Hi I'm try to create an alias for firefox but the terminal won't
remember the command after I restart the terminal any Ideas
what going on.

Here is the command

alias f="firefox"
 
Old 03-03-2017, 08:59 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 13,611

Rep: Reputation: 4364Reputation: 4364Reputation: 4364Reputation: 4364Reputation: 4364Reputation: 4364Reputation: 4364Reputation: 4364Reputation: 4364Reputation: 4364Reputation: 4364
so alias is working, but will be lost if you restart the terminal. That is normal, you need to save such kind of settings.
http://www.linfo.org/make_alias_permanent.html
http://askubuntu.com/questions/1414/...ermanent-alias
here is a better explanation:
http://unix.stackexchange.com/questi...x-like-systems
 
2 members found this post helpful.
Old 03-03-2017, 09:04 AM   #3
actinide
Member
 
Registered: Jan 2012
Posts: 323

Original Poster
Rep: Reputation: Disabled
Whats the point of that
 
Old 03-03-2017, 09:27 AM   #4
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Yawnstown, Ohio
Distribution: Mojave
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Code:
?=alias+firefox+terminal
 
Old 03-03-2017, 09:34 AM   #5
actinide
Member
 
Registered: Jan 2012
Posts: 323

Original Poster
Rep: Reputation: Disabled
command not found ?=alias+firefox+terminal
 
Old 03-03-2017, 09:35 AM   #6
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 8,445
Blog Entries: 13

Rep: Reputation: 3762Reputation: 3762Reputation: 3762Reputation: 3762Reputation: 3762Reputation: 3762Reputation: 3762Reputation: 3762Reputation: 3762Reputation: 3762Reputation: 3762
Quote:
Originally Posted by pan64 View Post
so alias is working, but will be lost if you restart the terminal. That is normal, you need to save such kind of settings.
http://www.linfo.org/make_alias_permanent.html
http://askubuntu.com/questions/1414/...ermanent-alias
here is a better explanation:
http://unix.stackexchange.com/questi...x-like-systems
Quote:
Originally Posted by actinide View Post
Whats the point of that
Hi actinide,

Can you clarify your question here?

If you're asking what the point of pan64's answer is, they are explaining that you have to permanently save your alias's and so they will still be there for all terminal sessions and across a reboot of your machine. And then they offered some links to help with how to save those settings.
 
1 members found this post helpful.
Old 03-03-2017, 09:37 AM   #7
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 13,611

Rep: Reputation: 4364Reputation: 4364Reputation: 4364Reputation: 4364Reputation: 4364Reputation: 4364Reputation: 4364Reputation: 4364Reputation: 4364Reputation: 4364Reputation: 4364
this is how it works by design.
you can either make temporary changes or make them permanent.
 
Old 03-03-2017, 09:44 AM   #8
actinide
Member
 
Registered: Jan 2012
Posts: 323

Original Poster
Rep: Reputation: Disabled
Thats perfect. I just thought when you create an alias it that was saved automatically by the system.
 
Old 03-03-2017, 11:02 AM   #9
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Yawnstown, Ohio
Distribution: Mojave
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
Originally Posted by actinide View Post
command not found ?=alias+firefox+terminal
Did I say terminal command?
Search Engine format.

Nothing is gonna help, IMO if you don't learn to distinguish subtleties.

Last edited by Habitual; 03-03-2017 at 11:05 AM.
 
Old 03-03-2017, 11:17 AM   #10
actinide
Member
 
Registered: Jan 2012
Posts: 323

Original Poster
Rep: Reputation: Disabled
I'm lost
 
Old 03-03-2017, 11:22 AM   #11
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,237

Rep: Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653
He was just saying that you could have searched google for this answer with this URL:

https://www.google.com/search?q=alias+firefox+terminal

In a google url "q=" signifies the search query. In this case "alias firefox terminal". If a person would have searched this, they would get a list of results that show them how to make an alias permanent.

Last edited by szboardstretcher; 03-03-2017 at 11:25 AM.
 
1 members found this post helpful.
Old 03-03-2017, 11:29 AM   #12
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 8,445
Blog Entries: 13

Rep: Reputation: 3762Reputation: 3762Reputation: 3762Reputation: 3762Reputation: 3762Reputation: 3762Reputation: 3762Reputation: 3762Reputation: 3762Reputation: 3762Reputation: 3762
Perhaps the suggestion to search might have been made more clearly.
 
Old 03-03-2017, 11:41 AM   #13
actinide
Member
 
Registered: Jan 2012
Posts: 323

Original Poster
Rep: Reputation: Disabled
I thought this would work but didn't https://www.youtube.com/watch?v=j_68Qle-iRI
 
Old 03-03-2017, 11:47 AM   #14
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,237

Rep: Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653
Log into terminal
run this:
Code:
echo "alias f='firefox'" >> .bashrc
exit terminal
Log into terminal
type 'f'

Better explanation in your previous alias question: http://www.linuxquestions.org/questi...nd-4175586528/

Last edited by szboardstretcher; 03-03-2017 at 12:19 PM.
 
1 members found this post helpful.
Old 03-03-2017, 11:53 AM   #15
actinide
Member
 
Registered: Jan 2012
Posts: 323

Original Poster
Rep: Reputation: Disabled
Nice one szboardstretcher
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] Alias command actinide Linux - Newbie 33 08-09-2016 12:41 AM
bash: command works at command line, but not via an alias porphyry5 Programming 3 03-17-2012 03:48 PM
tar command alias command rlg Linux - Newbie 0 03-11-2008 08:21 AM
Use for the alias command Metablade Linux - Newbie 4 10-12-2005 06:44 PM
alias command zeviddalop Linux - Newbie 3 01-12-2005 10:59 PM

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

All times are GMT -5. The time now is 03:54 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration