Linux: First Steps
Open a terminal and find your way around: where you are, what's here, and who you are.
Most servers on the internet run Linux, and almost every security tool assumes you're comfortable in a terminal. This room gets you moving.
1
The shell
A shell reads the commands you type and runs them. The prompt usually tells you who and where you are:
student@makoo:~$That's user
studenton machinemakoo, in the home directory (~). The$means a normal user;#means root.Command What it does pwdprint the working directory lslist files ( ls -ashows hidden ones,ls -lshows details)cd dirchange directory ( cd ..goes up,cd ~orcdgoes home)whoamiprint your user name Files whose names start with a dot, like
.bashrc, are hidden: plainlsskips them.practice terminal · student@makooWelcome! Try: pwd, ls, ls -a, cd, cat. Type 'help' for everything.
student@makoo:~$2
The file system
Linux has a single tree of directories starting at
/(the root). A few you'll see constantly:Path Contains /homeusers' home directories /etcsystem configuration files /var/loglog files /tmptemporary files, writable by everyone /rootthe root user's home A path starting with
/is absolute. Anything else is relative to where you are.
⚑ Report a problem with this room
Log in to report a problem.