18 essential commands for new Linux users

[jdoe@fedora ~]$ ls -ld /home/jdoe
drwx------. 1 jdoe jdoe 106 Apr 3 14:39 /home/jdoe

As you may have suspected, “r” stands for read, “w” means write and “x” is for execute. Note that no permissions are available for other group members and anyone else on the system. Each user will be the only member of a group with the same name. For example, the user “jdoe” is the only member of the group “jdoe”, but could be a member of other groups as well.

It’s important to know that files in other locations on the system can be listed by using the full paths names provided, of course, that you have read access to the directories in which the files are located.

[jdoe@fedora ~]$ ls /usr/bin/date
/usr/bin/date

Read more: Linux fundamentals: Viewing files, commands, processes and systems

2. which

The which command will provide the full path name for a command. It does this by searching through all the directories in your search path until it finds it and then displaying the file location. Not sure if “date” is the right name for the command that displays the current date? Try this:

[jdoe@fedora ~]$ which date
/usr/bin/date

3. cd

The cd (change directory) command will move you around the file system. An easy first step is to move into the /tmp directory and then back home by using the cd command without any arguments. Notice the change in the prompt (addition of “tmp”).

[jdoe@fedora ~]$ cd /tmp
[jdoe@fedora tmp]$ cd

4. pwd

The pwd (present working directory) command will confirm your current location in the file system.



Source link

Leave a Comment