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

How To Install Drivers For Your Creative Sound Card

Its necessary to install device drivers and applications to use the Sound Blaster Audigy. The following instructions - applicable to all supported Windows operating systems - describe how to install these drivers and associated bundled applications: After installation of the Sound Blaster … [Read More...]

Which UK cities have the best network coverage?

The UK’s network connectivity is above average when compared to other countries, sitting at around 77% 4G availability nationwide, for example, and yet sometimes we still find ourselves dropping out during a call, or our videos stuttering and freezing. Struggling to send a text when you’re out … [Read More...]

Defend Your Computer Against Ransomware

When you are infected by Ransom-malware, you’ll recognize it, for this is a malware that hinder the functionality of your computer access. It will demand a ransom payment so that the functionality of the system will work again. Locking your computer in some way is what Ransomware program does. It … [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...]

10 Exceptional Books on ChatGPT that Will Blow Your Mind

ChatGPT is a powerful new AI tool that is taking the world by storm. You are going to find a lot of amazing books that will teach you how to make the … [Read More...]

Guides

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

Recent Posts

Installing a SCSI device – making the connections

Squeeze either side of the connector to connect the supplied SCSI cable to the SCSI host adapter card's external SCSI connector. Connect the … [Read More...]

DirectX

Graphics technology is a particularly fast-developing area of the PC industry, with new chipsets, new revisions of … [Read More...]

Color Scanners

Colour scanners have three light sources, one for each of red, green and blue primary. Some scanning heads contain a … [Read More...]

[footer_backtotop]

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