-
Senior Member
registered user
Re: permanent alias
--When you change .bashrc, or any other file that affects bash settings, you need to either re-read it ("source") or logout/login again.
> [ -f /etc/profile ] && . /etc/profile
Pseudocode:
" If exists file /etc/profile THEN source /etc/profile " -- The "&&" means "only execute the following if the preceding command has not thrown an error". Similarly, "||" means "only execute the following if the preceding HAS thrown an error/is False."
--This syntax confused the heck out of me on UNIX back in the day as well, until I read O'Reilly's excellent BASH reference, and found out the "." is shorthand for the "source" command.
' man bash '
" /source "

Originally Posted by
finferflu
I'm sorry to ask such a simple question, but I am really confused.
I'm trying to make some aliases permanent, but I can't find the file where to write them.
I'm using Knoppix 4.0 HD installation. When write something in my ~/.bashrc file, nothing happens, and by the way, this is what my .bashrc file says (and also what /etc/bash.bashrc says):
Code:
# /etc/bash.bashrc
[ -f /etc/profile ] && . /etc/profile
To be honest I don't really undestand what it means. I remember I managed to create some permanent aliases using the file that makes aliases for all the users, but I forgot where it is..
If anybody could kindly help me I would be grateful. In this way I could finally get the knowledge I was looking for, since I read guides over guides, without any satisfactory explanation. Any suggestion about a good guide would be appreciated as well.
Thank you for your help.
Similar Threads
-
By rcblach in forum General Support
Replies: 0
Last Post: 06-18-2006, 12:23 AM
-
By thomas_remkus in forum Hardware & Booting
Replies: 5
Last Post: 03-12-2005, 02:47 PM
-
By GaTk in forum General Support
Replies: 11
Last Post: 10-28-2004, 10:43 PM
-
By kant in forum Networking
Replies: 0
Last Post: 09-12-2004, 07:09 PM
-
By Monicker in forum General Support
Replies: 1
Last Post: 08-26-2004, 12:50 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules

Crucial MX500 1TB 2.5" SATA III Internal SSD CT1000MX500SSD1
$99.99

Dell Latitude 14" Laptop Computer Intel i5 Up To 32GB RAM 1TB SSD Windows 11 Pro
$316.61

Samsung 2.5" 870 EVO SSD SATA III 250GB 500GB 1TB Internet Solid State Drive Lot
$60.00

Dell Latitude 14" Laptop Computer Intel i7 Up To 32GB RAM 1TB SSD Windows 11 Pro
$349.48

Lenovo Legion 5 Gaming 15.1" WQXGA OLED 165Hz Core i9-14900HX 16GB 1TB RTX 5070
$1469.00

1TB Kingston DataTraveler Max DTMAX/1TB USB Type-C Flash Drive
$86.95

Netac 2TB 1TB 512GB 256GB Internal SSD 2.5inch SATAIII Solid State Drive lot
$1090.00

External SSD 1TB 2TB 4TB Portable Hard Drive USB 3.0 Type-C High Speed PC Mac
$19.99

Dell Precision 7670 i7-12850HX 2.1GHz 32GB 1TB NVMe 16" A1000 Win 11 Pro: Good
$649.00

External Solid State Drive USB 3.2 Gen2, 1TB SSD External Hard Drive with C to A
$100.00