Friday, May 3, 2024
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 3168  / 2 Years ago, sat, june 11, 2022, 8:13:39

How can I set -P flag to every cd command? I do that every time. There are LS flag environment variable which I could use for ls command so I wonder can -P be set as default?


More From » command-line

 Answers
4

Open the file /home/your-username/.bashrc and add the following line to the end:



alias cd='cd -P'


Open a new terminal, and try using cd to see if it worked for you.


[#30321] Sunday, June 12, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
aveerakfas

Total Points: 106
Total Questions: 148
Total Answers: 129

Location: Monaco
Member since Sun, Jan 1, 2023
1 Year ago
;