Ka Terminal: Ho ntlafatsa ponahalo ea console

Ke e mong oa ba ratang ho sebelisa sesebelisoa. Ke nahana hore basebelisi bohle ba GNU / Linux ka nako e 'ngoe ba ke ke ba phela kantle ho eona, hobane sengoathoana seo se tletseng mangolo se re nolofalletsa bophelo, ha ho joalo?

Empa re ka e etsa hore e shebahale e le ntle haholo ho feta ea mantlha. Mohlala oa sena o ka bonoa (le ho jarollwa) ho tsoa ho gnome-sheba. Malebela ao ke tla u bonts'a ona, ke ho tloha seemelong sa rona sa marang-rang ka ponahalo e latelang:

Joalokaha u bona, faele ea taelo ea ho phethisa mme e behwa dipakeng tsa tatellano ka nngwe lethathamo la nako ka nako ea sistimi.

Ke e etsa joang?

Re bula mohlophisi oa mongolo (mohlala Gedit) ra e kenya kahare:

# Fill with minuses
# (this is recalculated every time the prompt is shown in function prompt_command):

fill="--- "
reset_style='\[\033[00m\]'
status_style=$reset_style'\[\033[0;90m\]' # gray color; use 0;37m for lighter color
prompt_style=$reset_style
command_style=$reset_style'\[\033[1;29m\]' # bold black
# Prompt variable:
PS1="$status_style"'$fill \t\n'"$prompt_style"'${debian_chroot:+($debian_chroot)}\u@\h:\w\$'"$command_style "
# Reset color for command output
# (this one is invoked every time before a command is executed):
trap 'echo -ne "\e[0m"' DEBUG
function prompt_command {
# create a $fill of all screen width minus the time string and a space:
let fillsize=${COLUMNS}-9
fill=""
while [ "$fillsize" -gt "0" ] do
fill="-${fill}" # fill with underscores to work on
let fillsize=${fillsize}-1
done
# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
bname=`basename "${PWD/$HOME/~}"`
echo -ne "\033]0;${bname}: ${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"
;;
*)
;;
esac
}
PROMPT_COMMAND=prompt_command

Re e boloka kahare ho / hae ka lebitso .bash_ps2 ka mohlala. Ebe re bula file ea rona ea .bashrc mme rea eketsa:

if [ -f "$HOME/.bash_ps2" ]; then
. "$HOME/.bash_ps2"
fi

Re bula sesebelisoa mme re bona liphetoho 😀

 

E bonoa ho: Batho.


Litaba tsa sengoloa sena li latela melao-motheo ea rona ea melao ea boitšoaro ea bongoli. Ho tlaleha phoso tlanya mona.

Maikutlo a 17, siea ea hau

Siea maikutlo a hau

aterese ya hao ya imeile ke ke ho phatlalatswa. masimo a hlokahala a tšoailoe ka *

*

*

  1. E ikarabella bakeng sa data: Miguel Ángel Gatón
  2. Morero oa data: Laola SPAM, tsamaiso ea maikutlo.
  3. Molao: Tumello ea hau
  4. Puisano ea data: Lintlha li ke ke tsa tsebisoa batho ba boraro ntle le ka tlamo ea molao.
  5. Polokelo ea data: Database e hapiloeng ke Occentus Networks (EU)
  6. Litokelo: Nako efe kapa efe o ka fokotsa, oa hlaphoheloa mme oa hlakola tlhaiso-leseling ea hau.

  1.   Luweeds a re

    Kea leboha blog ea pele ho tsohle le potso, na ho na le monyetla oa ho etsa xterm kapa lxterminal ho feta 'mala oa semelo le semelo? (Ke li-terminals tseo ke li sebelisang haholo).
    Kea leboha!

  2.   Eduardo a re

    KAKARETSOLLLLLLLLLLLLLL 🙂

    Ke e lekile bekeng e fetileng ha ke bala sehlooho sena ho blog e 'ngoe, empa ka lebaka la bothata ba litemana tsa se neng se lokela ho eketsoa ho .bashrc Ke ne ke sitoa ho e sebelisa. Joale e sebelitse hantle ho nna pele.

    Kea leboha.

    1.    KZKG ^ Gaara a re

      Ho monate ho tseba hore e entse feela seo o se batlang 😉
      litumeliso

  3.   Taregon a re

    :] khabane haeba e etsa seo ke nahanang hore ke nahana ... weeee, ke e kenya bekeng ena 😀

    1.    KZKG ^ Gaara a re

      Ebile ke e ntlafalitse hehe ... ke beha li-blushes tse ngata mme e shebahala e le betere haholo, ke tla ngola poso e phatlalatsang lintlafatso le liphetoho tsa ka 😉

      E hlophisitsoe: Sebakeng sa ho kenya seo .bash_ps2 beha sena se seng: http://paste.desdelinux.net/paste/6

      1.    Eduardo a re

        Ke fumana phoso meleng ea 13 le 34.

        1.    elav <° Linux a re

          Re se re le 2 😀

      2.    mphe sebete e le a re

        Fuck, moqapi e mong ea lehlakoreng le lefifi ...

        1.    KZKG ^ Gaara a re

          Ke siea khoutu mona, ha ke tsebe hore na hobaneng e ba fa phoso ... o_0U e ntshebeletsa hantle:
          # Fill with minuses
          # (this is recalculated every time the prompt is shown in function prompt_command):

          fill="--- "
          reset_style='\[\033[00m\]'
          status_style=$reset_style'\[\033[0;90m\]' # gray color; use 0;37m for lighter color
          prompt_style=$reset_style
          command_style=$reset_style'\[\033[1;29m\]' # bold black
          # Prompt variable:
          PS1="$status_style"'$fill \t\n'"$prompt_style"'${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m$
          # Reset color for command output
          # (this one is invoked every time before a command is executed):
          trap 'echo -ne "\e[0m"' DEBUG
          function prompt_command {
          # create a $fill of all screen width minus the time string and a space:
          let fillsize=${COLUMNS}-9
          fill=""
          while [ "$fillsize" -gt "0" ]
          do
          fill="-${fill}" # fill with underscores to work on
          let fillsize=${fillsize}-1
          done
          # If this is an xterm set the title to user@host:dir
          case "$TERM" in
          xterm*|rxvt*)
          bname=`basename "${PWD/$HOME/~}"`
          echo -ne "\033]0;${bname}: ${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"
          ;;
          *)
          ;;
          esac
          }
          PROMPT_COMMAND=prompt_command

  4.   Newbie a re

    Ke ntho e ntle haholo, ke mpa ke e lekile mme e sebetsa 100% ubuntu 11.10

    Lumeliso !!

  5.   amoha a re

    Ke fumana phoso meleng ea 13 le 34

    mohala oa 13: EOF e sa lebelloang ha u ntse u batla e tšoanang ``
    mola oa 34: phoso ea syntactic: pheletso ea faele e ne e sa lebelloa

    Ke sebelisa linux mint 11 lxde molemong oa eona.

    Kea leboha!

  6.   Boitumelo a re

    E sebetsa ka 100% le mosebelisi ea tloaelehileng, empa ha o fetoha superuser e emisa ho sebetsa, ha e etse letho. Ke nahana hore ho bonolo, empa ha ke tsebe ho etsa tharollo e ngata?

    1.    KZKG ^ Gaara a re

      Seo u se kentseng ho .bashrc, hape u tlameha ho e kenya / metso /. bashrc
      Etsa tlhahlobo 'me u re joetse hore na u joang 🙂

      Lumeliso 😀

      1.    Boitumelo a re

        E sebetsa hantle, ha ke tsebe hore na ha ke e leke joang pele ke botsa. kea leboha

        1.    KZKG ^ Gaara <° Linux a re

          Nah se ts'oenyehe 🙂

  7.   Angel a re

    Lumela motsoalle, haeba u ka nthusa ka kopo ke lekile empa selikalikoe ha se hlahe 'me se ntse se le ntsho, ke sebelisa fedora19, tatellano ea nako haeba e bonahala ... ntse ke leboha haholo ka tlatsetso ea hau 🙂

  8.   Miguel a re

    na see se sebetsa ka mokhoa o ts'oanang ho Debian ???