Categories
Unix Notes

Make bash the default shell – create a command file

1) Launch Terminal app

2) Create a sub directory in my root directory named bin. mkdir bin

3) Use emacs to create a file in my root directory named .profile emacs .profile PATH=$PATH:~/bin export PATH (note: ctrl-x ctrl-s = save and ctrl-x ctrl-c = exit)

4) Use NetInfo Manager to change my default shell to /bin/bash.

5) Exit and relaunch Terminal app

6) Use emacs to create command file in bin. emacs bin/killclassic #!/bin/sh

kill -9 `ps -aux | grep [C]lassic S | awk ‘{print $2}’` (note: ctrl-x ctrl-s = save and ctrl-x ctrl-c = exit)

7) Use chmod to make the command file executable. chmod +x bin/