pctechguide.com

  • Home
  • Guides
  • Tutorials
  • Articles
  • Reviews
  • Glossary
  • Contact

Linux Commands for Navigating and Viewing Directories

Linux has hundreds of commands available, but to get around the system, view and edit text files we only need a handful. We’ll take a look here at the basic commands that are essential in setting up the dedicated server (download a free copy of Linux to test drive it).

Notice the convention of the $ sign in the examples given. This means that you are logged in to your Linux server and at the command prompt. From this point, simply type in the command and press enter. Anything in square brackets represents an instance that you’ll substitute with an appropriate value – so for instance [username] will be substituted with your username.

Sudo management is related to LDAP as a way of adding an extra layer of security to the primary authentication against an LDAP directory server, such as Active Directory.

Sudo Linux is a command that allows users to run programs with the security privileges of another user, usually the superuser or root. LDAP is a protocol that provides access to a directory service, where information about users, groups, and other objects can be stored and queried.

Brightrozee has a very interesting information about the Best Laptop For Linux Operating Systems And Distros.

Linux Commands: Navigating

$ pwd

Use this command to find out where you are in the directory structure. When you log on to Linux, your starting directory is always your home directory, so you’ll be in /home/[your username] as any other user than root, or /root if you’re logged in as root. But, this can be useful if you ever lose track!

$ cd [directory]

A workhorse command, this is used to change the current directory. The directory named can be relative to the current directory, or absolute. To move relatively, using .. will move you up one level, or typing a directory name will move you into a subdirectory of the current. So, for example, if you’re in the directory /home/[username] and want to move to the directory /etc, you can do it in a couple of ways. If you type:

$ cd ..

You’ll be moved up one directory, so you’ll now be in the /home directory. Repeat the command, and you’ll be in the root (/) directory. Then, type:

$ cd etc

Now, you’ll be in the /etc directory. However, this is a bit cumbersome, but absolute addressing can achieve the same move in one step by simply preceding the address with a forward slash /. When you do this, the directory typed will be treated as relative to the root directory. So, from the example above, to move from /home/[username] directly to the /etc folder, enter:

$cd /etc

This will move the current directory to the /etc directory in one step. To move back, use:

$ cd /home/[username]

You can also use the following with cd:

$ cd ../../

Moves up two directories, and you can extend this as far back as required.

$ cd –

Moves to the previous working directory.

$ cd

Using cd without an argument moves the working directory straight to the user’s home directory. (Note: the cd command is synonymous with the chdir command.)

$ ls

This is the list command, so that you can view the contents of a directory including all files and subdirectories. If you don’t specify a directory then the current directory is assumed, but you can give an argument to a relative or absolute location.

$ ls /home/[username]

In this case the directory specified has its contents listed. The directory reference can be absolute or relative.

  • Advantage to Shared Web Hosting
  • Shared Hosting Issues – Shared Bandwidth and Server Resources
  • The Ins and Outs of Dedicated Web Hosting
  • When To Move To A Dedicated Server
  • Choosing a Dedicated Server for your Website
  • Managing and Operating a Dedicated Server Over the Internet Using Online Control Panels
  • Accessing the Linux Operating System on Dedicated Servers with PuTTY or SSH
  • How to Create a Secure Password
  • Using Sudo for Super User Access to Root Privileges in Linux
  • The Linux Directory Structure
  • Linux Commands for Navigating and Viewing Directories
  • Creating, Moving, Renaming and Copying Files and Directories in Linux
  • Find, View and Delete Files and Directories Using Linux Commands
  • Using vi to Edit Text Files on A Linux Dedicated Server

Filed Under: Moving from Shared to Dedicated Web Hosting Tagged With: list directory contents, navigating Linux, view directories in Linux, view directory contents in Linux

Latest Articles

Five applications of artificial intelligence in agriculture

Machine learning has affected many industries and agriculture is no exception. In this post, we are going to analyze the advantages of its implementation, as well as the factors that discourage farmers from implementing it. Artificial intelligence creates new possibilities for generating value in … [Read More...]

How Do You Diagnose a Failing Disc? – Part 1

You need to know what steps to follow to learn and identify the causes of a disc that is not working and not being recognized by Windows or your computer. How to check the SETUP or BIOS settings. There are many possible symptoms in connection with these problems. Here are all of the steps that you … [Read More...]

Guide to SanDisk’s CompactFlash memory card

Memory manufacturer SanDisk introduced CompactFlash (CF) in 1994 as a small format memory card, which used the existing PCMCIA-ATA specification to communicate with PCs. These cards are roughly a quarter the size of a PC Card and use flash technology that allows data to be stored indefinitely, … [Read More...]

Gaming Laptop Security Guide: Protecting Your High-End Hardware Investment in 2025

Since Jacob took over PC Tech Guide, we’ve looked at how tech intersects with personal well-being and digital safety. Gaming laptops are now … [Read More...]

20 Cool Creative Commons Photographs About the Future of AI

AI technology is starting to have a huge impact on our lives. The market value for AI is estimated to have been worth $279.22 billion in 2024 and it … [Read More...]

13 Impressive Stats on the Future of AI

AI technology is starting to become much more important in our everyday lives. Many businesses are using it as well. While he has created a lot of … [Read More...]

Graphic Designers on Reddit Share their Views of AI

There are clearly a lot of positive things about AI. However, it is not a good thing for everyone. One of the things that many people are worried … [Read More...]

Redditors Talk About the Impact of AI on Freelance Writers

AI technology has had a huge impact on our lives. A 2023 survey by Pew Research found that 56% of people use AI at least once a day or once a week. … [Read More...]

11 Most Popular Books on Perl Programming

Perl is not the most popular programming language. It has only one million users, compared to 12 million that use Python. However, it has a lot of … [Read More...]

Guides

  • Computer Communications
  • Mobile Computing
  • PC Components
  • PC Data Storage
  • PC Input-Output
  • PC Multimedia
  • Processors (CPUs)

Recent Posts

How To Remove Remove Internet Antivirus 2017

Internet Antivirus 2017 is a false security client and a clone of several other rogues. Like all fake security clients you are going to want to … [Read More...]

Avast! Pro Antivirus Review

PROS: Shields for all user computing sessions CONS: The shareware reputation may prevent serious consideration. OVERVIEW: Avast! Pro Antivirus … [Read More...]

Protecting Virtualized Data

More and more businesses are converting their physical infrastructures over to virtualization. Virtualization has many benefits that are good for … [Read More...]

[footer_backtotop]

Copyright © 2025 About | Privacy | Contact Information | Wrtie For Us | Disclaimer | Copyright License | Authors