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

VoIP

VoIP Definition: Voice over IP: The technology used to transmit voice conversations over a data network using the Internet Protocol. The data network involved might be the Internet itself, or a corporate intranet, or managed networks used by local or long distance carriers and ISPs. The technique … [Read More...]

PC Health Advisor Review

PC Health Advisor is one of the better registry cleaners on the market. Bang for buck this client has more features then most registry cleaners and gets the job done. You will be able to fully clean the registry, manage start-up items, scan for malware, defrag your computer as well as several other … [Read More...]

Recover My Files Review

  This is PC Tech's number one choice for data recovery! As far as all around data recovery software goes, Recover My Files would have to be my absolute favorite. This product is great and I highly recommend it to anyone having any data issues. It has a very high success rate for data … [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 Windows Easy Warden

Easiest Removal Option: Remote Repair: Paying an expert to remove this threat is always the easiest option. It's also the most expensive. … [Read More...]

Tape Storage Compatibility

In its early days, some MO disks were proprietary. Nowadays both the 3.5in and 5.25in disk types are governed by ISO … [Read More...]

Google Apps For Business is Making Strides

Google has evolved over the years. It was once only a search engine, and a darn good one. But, the company behind the search engine has evolved into a … [Read More...]

[footer_backtotop]

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