How to create an folder path alias on ubuntu EC2 instance?access to usr/local/binApache Alias Folder: 403 Access ForbiddenCommand not found for aliasRun program from anywhere without changing directoryWriting an alias that puts a folder and its subfolders/files into an encrypted archive titled with the dateHow to resolve ERROR: virtualenvwrapper could not find virtualenv in your pathHow to remove a directory path from PATH permanently?Editing bashrc to run a program from the terminalCannot source .nanorc correctly: command “include” not foundalias not working inside bash shell script

apt-get update is failing in debian

Best way to store options for panels

What is the opposite of 'gravitas'?

What to do with wrong results in talks?

Why is delta-v is the most useful quantity for planning space travel?

How to be diplomatic in refusing to write code that breaches the privacy of our users

Why are on-board computers allowed to change controls without notifying the pilots?

Is a roofing delivery truck likely to crack my driveway slab?

Cynical novel that describes an America ruled by the media, arms manufacturers, and ethnic figureheads

Applicability of Single Responsibility Principle

Was the picture area of a CRT a parallelogram (instead of a true rectangle)?

How does residential electricity work?

Bash method for viewing beginning and end of file

At which point does a character regain all their Hit Dice?

There is only s̶i̶x̶t̶y one place he can be

Why does John Bercow say “unlock” after reading out the results of a vote?

What will be the benefits of Brexit?

Why "be dealt cards" rather than "be dealing cards"?

How does it work when somebody invests in my business?

How to verify if g is a generator for p?

Implement the Thanos sorting algorithm

How could Frankenstein get the parts for his _second_ creature?

How do I rename a LINUX host without needing to reboot for the rename to take effect?

I'm in charge of equipment buying but no one's ever happy with what I choose. How to fix this?



How to create an folder path alias on ubuntu EC2 instance?


access to usr/local/binApache Alias Folder: 403 Access ForbiddenCommand not found for aliasRun program from anywhere without changing directoryWriting an alias that puts a folder and its subfolders/files into an encrypted archive titled with the dateHow to resolve ERROR: virtualenvwrapper could not find virtualenv in your pathHow to remove a directory path from PATH permanently?Editing bashrc to run a program from the terminalCannot source .nanorc correctly: command “include” not foundalias not working inside bash shell script













2















ubuntu 18.04 on AWS



I followed an answer on stackoverflow to create a path alias:



nano ~/.bashrc

alias myfolder='/home/xxx/pms'


When I try to cd



cd myfolder


I get:




No such file or Directory




But if I use the path it works.



I am not sure what the issue here is.



TIA










share|improve this question






















  • If you use alias "myfolder"="cd /home/xxx/pms" and source ~/.bashrc you'll be able to access your folder typing only myfolder on the terminal...

    – Rafael Muynarsk
    yesterday
















2















ubuntu 18.04 on AWS



I followed an answer on stackoverflow to create a path alias:



nano ~/.bashrc

alias myfolder='/home/xxx/pms'


When I try to cd



cd myfolder


I get:




No such file or Directory




But if I use the path it works.



I am not sure what the issue here is.



TIA










share|improve this question






















  • If you use alias "myfolder"="cd /home/xxx/pms" and source ~/.bashrc you'll be able to access your folder typing only myfolder on the terminal...

    – Rafael Muynarsk
    yesterday














2












2








2


1






ubuntu 18.04 on AWS



I followed an answer on stackoverflow to create a path alias:



nano ~/.bashrc

alias myfolder='/home/xxx/pms'


When I try to cd



cd myfolder


I get:




No such file or Directory




But if I use the path it works.



I am not sure what the issue here is.



TIA










share|improve this question














ubuntu 18.04 on AWS



I followed an answer on stackoverflow to create a path alias:



nano ~/.bashrc

alias myfolder='/home/xxx/pms'


When I try to cd



cd myfolder


I get:




No such file or Directory




But if I use the path it works.



I am not sure what the issue here is.



TIA







command-line bash amazon-ec2 alias






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked yesterday









SidSid

1134




1134












  • If you use alias "myfolder"="cd /home/xxx/pms" and source ~/.bashrc you'll be able to access your folder typing only myfolder on the terminal...

    – Rafael Muynarsk
    yesterday


















  • If you use alias "myfolder"="cd /home/xxx/pms" and source ~/.bashrc you'll be able to access your folder typing only myfolder on the terminal...

    – Rafael Muynarsk
    yesterday

















If you use alias "myfolder"="cd /home/xxx/pms" and source ~/.bashrc you'll be able to access your folder typing only myfolder on the terminal...

– Rafael Muynarsk
yesterday






If you use alias "myfolder"="cd /home/xxx/pms" and source ~/.bashrc you'll be able to access your folder typing only myfolder on the terminal...

– Rafael Muynarsk
yesterday











1 Answer
1






active

oldest

votes


















4














What you're trying



You may be thinking of the term alias as defined and used in Mac OS.



For ubuntu the command alias does something totally different. The command you have used is for creating new commands so you don't have to remember a longer command, or a longer command you type so much it is quicker to type the alias. For example, if I don't want to keep typing this command to launch a program:



java -jar /usr/local/bin/bfg-1.13.0.jar



You could create an alias called bfg in my Unix profile (or ~/.bashrc as you have) like this:



alias bfg='java -jar /usr/local/bin/bfg-1.13.0.jar'



From now on I can use bfg every time I want to run the java program.



What you really need



In Ubuntu what you're looking for is a symbolic link. A symbolic link is created with the ln command on Ubuntu (and all other Unix varieties). See the following example.



In the below example you can see a folder that already exists called pms in my home folder.



Thus its absolute path is /home/ubuntu/pms.



ubuntu@server:~$ ls -l
total 4
drwxrwxr-x 2 ubuntu ubuntu 4096 Mar 25 11:05 pms


Now I change to a mother directory where I want the link, what you are thinking of as an alias, and create the symbolic link with ln -s



ubuntu@server:~$ cd /tmp/
ubuntu@server:/tmp$ ln -s /home/ubuntu/pms myfolder


Now I'm able to change directory to this alias as you understand it.



ubuntu@server:/tmp$ cd myfolder/
ubuntu@server:/tmp/myfolder$ pwd
/tmp/myfolder


To be clear, an alias is a completely different thing in Unix & Linux land. The symbolic link I have made can be seen by listing the /tmp directory where I created it.



ubuntu@server:/tmp/myfolder$ cd /tmp
ubuntu@server:/tmp$ ls -l
total 16
lrwxrwxrwx 1 ubuntu ubuntu 16 Mar 25 11:06 myfolder -> /home/ubuntu/pms


The contents of the /tmp/myfolder are one and the same as /home/ubuntu/pms.






share|improve this answer










New contributor




lantrix is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • Thanks for the detailed explanation. Now when I make changes to certain files using the above link, the changes will carry through?

    – Sid
    yesterday











  • Yes. Files and folders seen and created in the symlinked folder (from the example) /tmp/myfolder and in the original /home/ubuntu/pms are actually the same files on the disk.

    – lantrix
    15 hours ago










Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1128497%2fhow-to-create-an-folder-path-alias-on-ubuntu-ec2-instance%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









4














What you're trying



You may be thinking of the term alias as defined and used in Mac OS.



For ubuntu the command alias does something totally different. The command you have used is for creating new commands so you don't have to remember a longer command, or a longer command you type so much it is quicker to type the alias. For example, if I don't want to keep typing this command to launch a program:



java -jar /usr/local/bin/bfg-1.13.0.jar



You could create an alias called bfg in my Unix profile (or ~/.bashrc as you have) like this:



alias bfg='java -jar /usr/local/bin/bfg-1.13.0.jar'



From now on I can use bfg every time I want to run the java program.



What you really need



In Ubuntu what you're looking for is a symbolic link. A symbolic link is created with the ln command on Ubuntu (and all other Unix varieties). See the following example.



In the below example you can see a folder that already exists called pms in my home folder.



Thus its absolute path is /home/ubuntu/pms.



ubuntu@server:~$ ls -l
total 4
drwxrwxr-x 2 ubuntu ubuntu 4096 Mar 25 11:05 pms


Now I change to a mother directory where I want the link, what you are thinking of as an alias, and create the symbolic link with ln -s



ubuntu@server:~$ cd /tmp/
ubuntu@server:/tmp$ ln -s /home/ubuntu/pms myfolder


Now I'm able to change directory to this alias as you understand it.



ubuntu@server:/tmp$ cd myfolder/
ubuntu@server:/tmp/myfolder$ pwd
/tmp/myfolder


To be clear, an alias is a completely different thing in Unix & Linux land. The symbolic link I have made can be seen by listing the /tmp directory where I created it.



ubuntu@server:/tmp/myfolder$ cd /tmp
ubuntu@server:/tmp$ ls -l
total 16
lrwxrwxrwx 1 ubuntu ubuntu 16 Mar 25 11:06 myfolder -> /home/ubuntu/pms


The contents of the /tmp/myfolder are one and the same as /home/ubuntu/pms.






share|improve this answer










New contributor




lantrix is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • Thanks for the detailed explanation. Now when I make changes to certain files using the above link, the changes will carry through?

    – Sid
    yesterday











  • Yes. Files and folders seen and created in the symlinked folder (from the example) /tmp/myfolder and in the original /home/ubuntu/pms are actually the same files on the disk.

    – lantrix
    15 hours ago















4














What you're trying



You may be thinking of the term alias as defined and used in Mac OS.



For ubuntu the command alias does something totally different. The command you have used is for creating new commands so you don't have to remember a longer command, or a longer command you type so much it is quicker to type the alias. For example, if I don't want to keep typing this command to launch a program:



java -jar /usr/local/bin/bfg-1.13.0.jar



You could create an alias called bfg in my Unix profile (or ~/.bashrc as you have) like this:



alias bfg='java -jar /usr/local/bin/bfg-1.13.0.jar'



From now on I can use bfg every time I want to run the java program.



What you really need



In Ubuntu what you're looking for is a symbolic link. A symbolic link is created with the ln command on Ubuntu (and all other Unix varieties). See the following example.



In the below example you can see a folder that already exists called pms in my home folder.



Thus its absolute path is /home/ubuntu/pms.



ubuntu@server:~$ ls -l
total 4
drwxrwxr-x 2 ubuntu ubuntu 4096 Mar 25 11:05 pms


Now I change to a mother directory where I want the link, what you are thinking of as an alias, and create the symbolic link with ln -s



ubuntu@server:~$ cd /tmp/
ubuntu@server:/tmp$ ln -s /home/ubuntu/pms myfolder


Now I'm able to change directory to this alias as you understand it.



ubuntu@server:/tmp$ cd myfolder/
ubuntu@server:/tmp/myfolder$ pwd
/tmp/myfolder


To be clear, an alias is a completely different thing in Unix & Linux land. The symbolic link I have made can be seen by listing the /tmp directory where I created it.



ubuntu@server:/tmp/myfolder$ cd /tmp
ubuntu@server:/tmp$ ls -l
total 16
lrwxrwxrwx 1 ubuntu ubuntu 16 Mar 25 11:06 myfolder -> /home/ubuntu/pms


The contents of the /tmp/myfolder are one and the same as /home/ubuntu/pms.






share|improve this answer










New contributor




lantrix is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • Thanks for the detailed explanation. Now when I make changes to certain files using the above link, the changes will carry through?

    – Sid
    yesterday











  • Yes. Files and folders seen and created in the symlinked folder (from the example) /tmp/myfolder and in the original /home/ubuntu/pms are actually the same files on the disk.

    – lantrix
    15 hours ago













4












4








4







What you're trying



You may be thinking of the term alias as defined and used in Mac OS.



For ubuntu the command alias does something totally different. The command you have used is for creating new commands so you don't have to remember a longer command, or a longer command you type so much it is quicker to type the alias. For example, if I don't want to keep typing this command to launch a program:



java -jar /usr/local/bin/bfg-1.13.0.jar



You could create an alias called bfg in my Unix profile (or ~/.bashrc as you have) like this:



alias bfg='java -jar /usr/local/bin/bfg-1.13.0.jar'



From now on I can use bfg every time I want to run the java program.



What you really need



In Ubuntu what you're looking for is a symbolic link. A symbolic link is created with the ln command on Ubuntu (and all other Unix varieties). See the following example.



In the below example you can see a folder that already exists called pms in my home folder.



Thus its absolute path is /home/ubuntu/pms.



ubuntu@server:~$ ls -l
total 4
drwxrwxr-x 2 ubuntu ubuntu 4096 Mar 25 11:05 pms


Now I change to a mother directory where I want the link, what you are thinking of as an alias, and create the symbolic link with ln -s



ubuntu@server:~$ cd /tmp/
ubuntu@server:/tmp$ ln -s /home/ubuntu/pms myfolder


Now I'm able to change directory to this alias as you understand it.



ubuntu@server:/tmp$ cd myfolder/
ubuntu@server:/tmp/myfolder$ pwd
/tmp/myfolder


To be clear, an alias is a completely different thing in Unix & Linux land. The symbolic link I have made can be seen by listing the /tmp directory where I created it.



ubuntu@server:/tmp/myfolder$ cd /tmp
ubuntu@server:/tmp$ ls -l
total 16
lrwxrwxrwx 1 ubuntu ubuntu 16 Mar 25 11:06 myfolder -> /home/ubuntu/pms


The contents of the /tmp/myfolder are one and the same as /home/ubuntu/pms.






share|improve this answer










New contributor




lantrix is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.










What you're trying



You may be thinking of the term alias as defined and used in Mac OS.



For ubuntu the command alias does something totally different. The command you have used is for creating new commands so you don't have to remember a longer command, or a longer command you type so much it is quicker to type the alias. For example, if I don't want to keep typing this command to launch a program:



java -jar /usr/local/bin/bfg-1.13.0.jar



You could create an alias called bfg in my Unix profile (or ~/.bashrc as you have) like this:



alias bfg='java -jar /usr/local/bin/bfg-1.13.0.jar'



From now on I can use bfg every time I want to run the java program.



What you really need



In Ubuntu what you're looking for is a symbolic link. A symbolic link is created with the ln command on Ubuntu (and all other Unix varieties). See the following example.



In the below example you can see a folder that already exists called pms in my home folder.



Thus its absolute path is /home/ubuntu/pms.



ubuntu@server:~$ ls -l
total 4
drwxrwxr-x 2 ubuntu ubuntu 4096 Mar 25 11:05 pms


Now I change to a mother directory where I want the link, what you are thinking of as an alias, and create the symbolic link with ln -s



ubuntu@server:~$ cd /tmp/
ubuntu@server:/tmp$ ln -s /home/ubuntu/pms myfolder


Now I'm able to change directory to this alias as you understand it.



ubuntu@server:/tmp$ cd myfolder/
ubuntu@server:/tmp/myfolder$ pwd
/tmp/myfolder


To be clear, an alias is a completely different thing in Unix & Linux land. The symbolic link I have made can be seen by listing the /tmp directory where I created it.



ubuntu@server:/tmp/myfolder$ cd /tmp
ubuntu@server:/tmp$ ls -l
total 16
lrwxrwxrwx 1 ubuntu ubuntu 16 Mar 25 11:06 myfolder -> /home/ubuntu/pms


The contents of the /tmp/myfolder are one and the same as /home/ubuntu/pms.







share|improve this answer










New contributor




lantrix is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this answer



share|improve this answer








edited 15 hours ago





















New contributor




lantrix is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









answered yesterday









lantrixlantrix

1565




1565




New contributor




lantrix is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





lantrix is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






lantrix is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












  • Thanks for the detailed explanation. Now when I make changes to certain files using the above link, the changes will carry through?

    – Sid
    yesterday











  • Yes. Files and folders seen and created in the symlinked folder (from the example) /tmp/myfolder and in the original /home/ubuntu/pms are actually the same files on the disk.

    – lantrix
    15 hours ago

















  • Thanks for the detailed explanation. Now when I make changes to certain files using the above link, the changes will carry through?

    – Sid
    yesterday











  • Yes. Files and folders seen and created in the symlinked folder (from the example) /tmp/myfolder and in the original /home/ubuntu/pms are actually the same files on the disk.

    – lantrix
    15 hours ago
















Thanks for the detailed explanation. Now when I make changes to certain files using the above link, the changes will carry through?

– Sid
yesterday





Thanks for the detailed explanation. Now when I make changes to certain files using the above link, the changes will carry through?

– Sid
yesterday













Yes. Files and folders seen and created in the symlinked folder (from the example) /tmp/myfolder and in the original /home/ubuntu/pms are actually the same files on the disk.

– lantrix
15 hours ago





Yes. Files and folders seen and created in the symlinked folder (from the example) /tmp/myfolder and in the original /home/ubuntu/pms are actually the same files on the disk.

– lantrix
15 hours ago

















draft saved

draft discarded
















































Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1128497%2fhow-to-create-an-folder-path-alias-on-ubuntu-ec2-instance%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







-alias, amazon-ec2, bash, command-line

Popular posts from this blog

Mobil Contents History Mobil brands Former Mobil brands Lukoil transaction Mobil UK Mobil Australia Mobil New Zealand Mobil Greece Mobil in Japan Mobil in Canada Mobil Egypt See also References External links Navigation menuwww.mobil.com"Mobil Corporation"the original"Our Houston campus""Business & Finance: Socony-Vacuum Corp.""Popular Mechanics""Lubrite Technologies""Exxon Mobil campus 'clearly happening'""Toledo Blade - Google News Archive Search""The Lion and the Moose - How 2 Executives Pulled off the Biggest Merger Ever""ExxonMobil Press Release""Lubricants""Archived copy"the original"Mobil 1™ and Mobil Super™ motor oil and synthetic motor oil - Mobil™ Motor Oils""Mobil Delvac""Mobil Industrial website""The State of Competition in Gasoline Marketing: The Effects of Refiner Operations at Retail""Mobil Travel Guide to become Forbes Travel Guide""Hotel Rankings: Forbes Merges with Mobil"the original"Jamieson oil industry history""Mobil news""Caltex pumps for control""Watchdog blocks Caltex bid""Exxon Mobil sells service station network""Mobil Oil New Zealand Limited is New Zealand's oldest oil company, with predecessor companies having first established a presence in the country in 1896""ExxonMobil subsidiaries have a business history in New Zealand stretching back more than 120 years. We are involved in petroleum refining and distribution and the marketing of fuels, lubricants and chemical products""Archived copy"the original"Exxon Mobil to Sell Its Japanese Arm for $3.9 Billion""Gas station merger will end Esso and Mobil's long run in Japan""Esso moves to affiliate itself with PC Optimum, no longer Aeroplan, in loyalty point switch""Mobil brand of gas stations to launch in Canada after deal for 213 Loblaws-owned locations""Mobil Nears Completion of Rebranding 200 Loblaw Gas Stations""Learn about ExxonMobil's operations in Egypt""Petrol and Diesel Service Stations in Egypt - Mobil"Official websiteExxon Mobil corporate websiteMobil Industrial official websiteeeeeeeeDA04275022275790-40000 0001 0860 5061n82045453134887257134887257

Frič See also Navigation menuinternal link

Identify plant with long narrow paired leaves and reddish stems Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?What is this plant with long sharp leaves? Is it a weed?What is this 3ft high, stalky plant, with mid sized narrow leaves?What is this young shrub with opposite ovate, crenate leaves and reddish stems?What is this plant with large broad serrated leaves?Identify this upright branching weed with long leaves and reddish stemsPlease help me identify this bulbous plant with long, broad leaves and white flowersWhat is this small annual with narrow gray/green leaves and rust colored daisy-type flowers?What is this chilli plant?Does anyone know what type of chilli plant this is?Help identify this plant