ok an alias is simply an appreviation (ll) of a longer command (ls -lah –color) defined in one of those files:

user@Debian8:~$ bash -l; # simulates a login
1. hello from /etc/bash.bashrc
2. hello from /etc/profile
7. hello from ~/.bash_profile
user@Debian8:~$ logout (Shortcut/Hotkey: Ctrl+D)
8. hello from ~/.bash_logout

usually /etc/bash.bashrc is the default global/system-wide (for all users) file to define system-wide aliases.

this user’s one starts like this:

vim /etc/bash.bashrc
... crazy stuff that the OS put there...

# ========================== custom settings

# seamless integration of vim in less, simply press v in less to edit the current file
export VISUAL=vim
export EDITOR="$VISUAL"
# vim:ts=4:sw=4

# ============== config basics

# Some more alias to avoid making mistakes:
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
alias grep="grep --color"

# this will give the (imho) pretty usefull date format
# drwxr-xr-x 5 ownedbyuser ownedbygroup 4.0K 2022-07-23 11:21 foldername
export TIME_STYLE=long-iso

# add some colors
alias ll="ls -lah --color"

# sort by date
alias ll_latest="ls -tlah --color --time-style=+%F"

# including timestamp
alias ll_full_time="ls -lah --color --full-time"

# give current date and time
alias datum="date '+DATE: %Y-%m-%d TIME: %H:%M:%S'"

 

about linux shells – bash csh zsh – LPIC-1 102 105.1 Customize and use the shell environment – when is run what config file during login – bash.bashrc – profile – .bashrc – .bash_login – .bash_profile

creditz:

https://unix.stackexchange.com/questions/275728/set-ls-l-time-format

admin