Ubuntu Terminal Command List

Navigation

pwd  —  Show current directory.
ls  —  List files and folders in current directory.
ls -l  —  Show more details.
ls -a  —  Show hidden files and folders.
ls – la  —  Show hidden files and folders with details.
clear — Clear screen.

cd [directory]  —  Change directory.
cd or cd~  —  Go home.
cd /  —  Go to root.
cd ..  —  Go up one directory.
cd –  —  Go back.

passwd  —  Change password.
echo  —  Print to screen.
info <command>  —  Display more information about a command.

File Management

mkdir [name]  —  Make a new folder.
rmdir [name]  —  Delete a folder.
touch [name]  —  Create new file, if it doesn’t already exist.
rm [name]  —  Delete a file.
cp [name] [new name]  —  Copy a file.
mv [name>] [directory] [new name]  —  Move a file.  Rename by moving to the same directory.

cat  [file] —  Show contents of a file.
grep [word] [file]  —  Search for word in file.
diff [file1] [file2]  —  Compare two files.

[command] > [file]  —  Save to file.
[command] >> [file]  —  Append to file.

chmod  —  Edit file permission.

gzip [file]  —  Compress file.
gunzip [file]  —  Uncompress.
tar cvf [name] [files]  —  Compress several files.
tar xvf [tar file]  —  Extract.

 

 

link:

https://help.ubuntu.com/community/UsingTheTerminal

One thought on “Ubuntu Terminal Command List

  • January 11, 2017 at 7:00 AM
    Permalink

    Some other commands worth noting would be:

    chown – change the owner of a file/folder
    nano or vi – edit contents of a file for example a script or text file
    top – lets you see what processes are running as-well as resource usage
    Michael recently posted…Creating Bash Loops With ExamplesMy Profile

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

CommentLuv badge