Since you are exploring how to control your environment in this First Linux Lab, it's a great time to learn about other "display" commands. In Linux, controlling what you see is just as important as the commands themselves!
Here are a few essential commands that affect your terminal display:
1. reset: The "Panic" Button
If you accidentally try to read a non-text file (like a program or an image) using cat, your terminal might start showing weird symbols or stop responding to keys.
- Command:
reset - Effect: It completely re-initializes the terminal, fixing broken fonts and clearing the screen. It’s more powerful than
clear.
2. tput: The Professional Controller
tput is used to control terminal capabilities.
- Try this:
tput colsortput lines - Effect: It tells you the width (columns) and height (lines) of your current terminal window.
- Try this:
tput setaf 2; echo "I am Green"(This changes the text color to green).
3. alias: Creating Your Own Shortcut
If you prefer the word "clean" instead of "clear", you can create your own command!
- Command:
alias clean='clear' - Effect: Now, whenever you type
clean, the terminal will clear itself.
4. stty: Terminal Settings
This command handles the hardware-level settings of the terminal.
- Try this:
stty -a - Effect: It displays all the "shortcut keys" currently set for your terminal (like what
^Cor^Zdo).
5. banner or figlet (Fun Display)
While not installed by default in every environment, these create large text banners.
- Try this:
echo "LabEx" | npx figlet(since Node.js is installed in this VM!) - Effect: It turns plain text into large ASCII art.
How this fits your Learning Journey:
In the Linux Skill Tree, these commands fall under Terminal Environment and Shell Customization. Mastering these allows you to create a workspace that feels comfortable and professional.
Are you ready to Continue and wrap up this introduction? Your Skill Tree is waiting to be updated!