Adding command aliases

Status
Not open for further replies.

cgethycx

Cadet
Joined
Apr 18, 2012
Messages
7
To no avail i have searched the interwebs and have come up empty handed.

I am on a search to find out how to add comand aliases for ssh.

I did find one article but it is requesting that i creata the .bashrc in the root dir but i do not have permission to save the file.

I immagine that i will have to change the file system to beable to write to it but i am hesitent to do that.

thanks
 
J

James

Guest
Which file you configure depends upon the shell that was selected when the user's account was created. The shell config file lives in the user's home directory (again, configured when you create the user). SSH should automatically drop the user into their home directory when they login.
 

cgethycx

Cadet
Joined
Apr 18, 2012
Messages
7
well i guess my article has mis informed me. So does anyone have any tips of adding command aliases for ssh?
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
If you setup home directories for your users from the GUI, then the files you will need to change will either be ".cshrc" or ".bashrc" IF you are using CSH or BASH. Those files will be in the root directory of each user. If you login directly with root on ssh (VERY bad), then yes, the filesystem is read-only. You can change that temporarily with "mount -uw /" and change it back with "mount -ur /", but you should avoid doing that. Setup home directories and create a user that you can "su" with (also make that user a member of the wheel group), then after you su, you can make root read the .cshrc or .bashrc with "source ~your-user/.bashrc" and it will have the aliases for the user you created. SUDO is not used in FreeBSD, "su" is used instead.

You'll have to do some more reading, I know there is a ton of material available on this stuff on the internet. YouTube even has videos about it.
 
Status
Not open for further replies.
Top