サクラのレンタルサーバーでbashが使えるようにする

サクラのレンタルサーバー

cshからbashの変更

bashコマンドのパスを確認する

% which bash
/usr/local/bin/bash

「chsh」コマンドでログインシェルを変更する。

% chsh -s /usr/local/bin/bash
Password:
chsh: user information updated

「.bash_profile」ファイルを作成する。

% vi .bash_profile

「.bash_profile」の編集


# .bash_profile
 
if [ -f ~/.bashrc ]; then
    . ~/.bashrc
fi
 
PATH=$PATH:$HOME/bin:$HOME/usr/local/bin
export PATH

「.bashrc」ファイルを作成する。

% vi .bashrc
# .bashrc
alias rm='rm -i'
alias mv='mv -i'
alias cp='cp -i'

sshでログインして確認する。

Last login: Sat Feb  1 15:47:45 2020 from hogehoge.net
FreeBSD 11.2-RELEASE-p14 (GENERIC) #0: Mon Aug 19 22:38:50 UTC 2019

Welcome to FreeBSD!

[hogehoge@www0000 ~]$ ls
MailBox         ports           sblo_files      www
db              sakura_pocket   work
[hogehoge@www0000 ~]$
スポンサーリンク
サクラのレンタルサーバー
Engineerをフォローする
レンサバ