Basic linux commands

From Amen Wiki

Jump to: navigation, search

[edit] Important Notice

As the systems administrator for your server, you need to understand that any modifications
to the operating system or settings could, if not carefully thought out, render your server
inaccessible or unusable. In a worst case scenario you may need to reinstall the server from
scratch resulting in the loss of all data stored on the server.

[edit] Commands

pwd

Print working directory, this will show you the full path to the directory you are currently in. This is very useful, especially when performing some of the other commands on this page.


ls

Lists the files in the directory you are in, an example of an advanced use of this command would be: ls -la which would list the files, their ownerships, modification dates and permissions.


man

Man allows you to view the manual were available for a command you may need to learn more about, 'man ls' for example would tell you all the things you can do with the ls command, like ls -la


cd 

Use cd to change directories. Type cd followed by the name of a directory to access that directory.Keep in mind that you are always in a directory and can navigate to directories hierarchically above or below.


cp

Copy file(s) with this command.


mv 

Move can be used to change the name of a directory, it can also be used to move a file or directory from one path location to another. Type mv followed by the current name of a directory and the new name of the directory.

Example: mv testdir newnamedir


mkdir 

make directory, creates folders.

Personal tools
Toolbox