'ls' command in terminal is showing all files and file permissions. How do I get back to normal with 'ls' showing only normal files and folders?

5,304

It looks like you have some alias defined. Find what it is by running:

alias ls

This must be defined somewhere in what of the startup scripts of your shell. For example in case of Bash, you could find the list of fils to look at in the FILES section near the end of man bash:

/etc/profile
      The systemwide initialization file, executed for login shells
~/.bash_profile
      The personal initialization file, executed for login shells
~/.bashrc
      The individual per-interactive-shell startup file

To temporarily bypass the alias, you could run command ls or \ls, or temporarily remove the alias with unalias ls.

Share:
5,304

Related videos on Youtube

Bryce
Author by

Bryce

Updated on September 18, 2022

Comments

  • Bryce
    Bryce over 1 year

    Want to get the terminal back to bryce@macbookpro instead of bryce@machine and have the 'ls' command only show visible files and folders.

    'ls' command results with hidden files and file permissions

    • Paulo
      Paulo about 6 years
      Maybe your ls is an alias, run alias to see if helps. You can set PS1 and alias 'ls=/usr/bin/ls' in .bash_profile (or .bashrc).
    • Gordon Davisson
      Gordon Davisson about 6 years
      As for "machine" in the prompt, see here and here.
  • Bryce
    Bryce about 6 years
    Thank you so much!! I accepted some files to get a local backend running at my new gig and did not catch the one changing my .bash_profile file... learning the hard way.