LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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, 07:52 AM   #1
actinide
Member
 
Registered: Jan 2012
Posts: 333

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, 07:59 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,791

Rep: Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304
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, 08:04 AM   #3
actinide
Member
 
Registered: Jan 2012
Posts: 333

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

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

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

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
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, 08:37 AM   #7
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,791

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

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, 10:02 AM   #9
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
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 10:05 AM.
 
Old 03-03-2017, 10:17 AM   #10
actinide
Member
 
Registered: Jan 2012
Posts: 333

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

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
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 10:25 AM.
 
1 members found this post helpful.
Old 03-03-2017, 10:29 AM   #12
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

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

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, 10:47 AM   #14
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
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 11:19 AM.
 
1 members found this post helpful.
Old 03-03-2017, 10:53 AM   #15
actinide
Member
 
Registered: Jan 2012
Posts: 333

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-08-2016 11:41 PM
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
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 10:34 AM.

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