Shell: Prompt

CLI fundamentals
Last update: 14 Sep 20:17
2
Students

Prompt Statement

You have seen many times what the command line prompt for new commands looks like. For example, in a Hexlet exercises it looks like this:

/usr/src/app$

PS1 variable (stands for "prompt string") defines how the prompt will look like, and in this exercise we'll change it.

solution

In the solution file write a command that globally changes the value of the PS1, so that the prompt looks like this:

> tirion@app$

Look at the current working directory:

> tirion@app$ pwd
/usr/src/app

Look at the username we logged in with:

> tirion@app$ whoami
tirion

Tips

For full access to the challenge you need a professional subscription.

A professional subscription will give you full access to all Hexlet courses, projects and lifetime access to the theory of lessons learned. You can cancel your subscription at any time.

Get access
130
courses
1000
exercises
2000+
hours of theory
3200
tests