![]() | Red Hat Enterprise Linux |
ShellsBourne-Again Shell (bash)Bash Prompt components[user@PCname currentdirectory]$ user bash prompt[user@PCname ~]$ user bash prompt in user home directory [root@PCname currentdirectory]# superuser bash prompt Symbols. Current directory.. Parent directory ~ Current User directory Keyboard ShortcutsCtrl+a Jump to the beginning of the command lineCtrl+e Jump to the end of the command line Ctrl+u Clear from the cursor to the beginning of the command line Ctrl+k Clear from the cursor to the end of the command line Ctrl+r Search the history list of commands for a pattern Tab : Command Completion up and Down Keys : Previous commands Browsing Basic Commands and Operations
Time an operation Syntax time command Example [eninam@localhost ~]$ time pwd Terminate the shell [eninam@localhost ~]$ exit [eninam@localhost ~]$ logout [root@lab ~]# hostname Dipslay your host machine name [root@lab ~]# hostname name change your host machine name temporary [root@lab ~]# reboot restart machine [root@lab ~]# hostnamectl set-hostname hostname Change System Host name stored in /etc/hostname Shutdown System[root@lab ~]# systemctl poweroff[root@lab ~]# shutdown –option time [+] [root@lab ~]# init 0 Time
LanguageChange system languageSyntax localectl set-locale language-code Example [root@localhost eninam]# localectl set-locale LANG=fr_FR.utf8 Language selection for a command Example [eninam@localhost ~]$ LANG=fr_FR.utf8 cal Display calendar in french [root@localhost eninam]# clear erase shell prompt [root@localhost eninam]# history show user recently used commands |