Find your starting point
These commands work on Ubuntu 24.04 LTS and AlmaLinux 9. Start in an SSH session as your normal login user; no administrative privileges are needed. A Linux path beginning with / is absolute: it starts at the filesystem root. A relative path is interpreted from your current working directory.
Run pwd to display that current location. Use cd with no argument to return to your home directory. The ~ symbol also represents your home directory, while .. refers to the directory above your current location.
pwd
cd
pwdRead a directory listing
The basic ls command lists names. Adding -l provides details such as permissions, owner, size, and modification time. Adding -a includes hidden names beginning with a dot; -h displays readable sizes. Hidden files are a naming convention, not a security feature.
Directories usually have a leading d in the long listing. On a typical VPS, /etc holds system configuration, /var holds changing service data and logs, and /home contains ordinary user home directories. Inspect these locations without changing their contents.
ls -lah
ls /etcCreate an isolated practice folder
Create a new glws-files-lab folder in your home directory. If mkdir reports that it already exists, choose a different folder name before continuing so the exercise does not overwrite earlier work.
The quoted filename below contains a space, so quoting keeps it together as one argument. After writing the sample text, cat displays it. Expect a file named server notes.txt containing one line about your first Linux file.
mkdir "$HOME/glws-files-lab"
cd "$HOME/glws-files-lab"
printf 'My first Linux file\n' > 'server notes.txt'
cat 'server notes.txt'Copy and rename the sample
cp creates another copy; mv moves a file or changes its name. The -i option asks before replacing an existing destination. Run these commands inside the practice folder, then list the result. You should see the original notes and the renamed backup.
cp -i 'server notes.txt' notes-backup.txt
mv -i notes-backup.txt notes-archive.txt
ls -lUse paths deliberately
Linux filenames are case-sensitive: Notes.txt and notes.txt are different names. Use Tab to complete a partially typed path and reduce spelling mistakes. If a command says No such file or directory, check pwd and the exact filename first. Leave the practice folder in place while learning; you can return to it from anywhere using its absolute home-based path.
cd
cd "$HOME/glws-files-lab"
pwdOfficial documentation
These upstream references provide more detail on the commands and workflows in this guide.