sini ada tips sikit utk customize bash prompt anda..
hehehe
1: check kat home directory anda, .bashrc anda wujud ke tidak
$ ls -a
klu tak der create newfile bernama .bashrc di dlm home directory anda
boleh guna apa2 aja editor yg anda tahu/suka
vi, dtpad, gnome-text-editor, pico, kwrite dan sbgnya..
2. masukkan line
PS1="prompt baru anda"
ke dalam .bashrc
contoh2nyaCODE
PS1="nadahahs was here >"
PS1="nadahahs@localhost $"
PS1="[\u@\h:\W, \@, \d]> "#nota satu
PS1="[\u][\w] >" #nota dua
nota satu
\u utk whoami
\h hostname
\W working directory (format pendek)
\@ masa sekarang
\d tarikh hari ni
nota dua
\w working directory (format panjang)
klu beginner.. tak faham sangat...
ok dalam linux anda pastikan anda sedang menggunakan bash
taip spt bawah ini (tanda dollar tu takyah taip la bang oi)
$ echo $SHELL
klu /bin/bash.. sah anda menggunakan bash
jadi langkah seterusnya taip
$ echo "PS1="[\u@\h][\w] \@, \d]>"" >> .bashrc
selamat mencuba
old time as known as My QWERTY. I love to share tips and trick to everybody.
::sh::My QWERTY
Saturday, February 25, 2006
Customize Your Bash
in Bahasa
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment