Preview

Basic Linux Command

Satisfactory Essays
Open Document
Open Document
359 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Basic Linux Command
Command's Purpose

Linux

Basic Linux Example

Copies files

cp

cp thisfile.txt /home/thisdirectory

Moves files

mv

mv thisfile.txt /home/thisdirectory

Lists files

ls

ls (all information ls –l)

Clears screen

clear

clear

Closes prompt window

exit

exit

Displays or sets date

date

date

Deletes files

rm

rm thisfile.txt

"Echoes" output on the screen

echo

echo this message

Edits files with simple text editor

vi

vi thisfile.txt

Compares the contents of files

diff

diff file1 file2

Finds a string of text in a file

grep

grep this word or phrase thisfile.txt

Formats a diskette

mke2fs (or mformat

/sbin/mke2fs /dev/fd0 (/dev/fd0 is the Linux equivalent of A:)

Displays command help

man

man command

Creates a directory

mkdir

mkdir directory

View a file

less

less thisfile.txt

Renames a file

mv

mv thisfile.txt thatfile.txt[e]

Displays your location in the file system

pwd

pwd

Changes directories with a specified path
(absolute path)

cd pathname

cd /directory/directory

Changes directories with a relative path

cd ..

cd ..

Displays the time

date

date

Shows amount of RAM and use

free

free

add a user to the system

adduser

view all commands starting with x

x then [tab] <beep> [tab]

Make a symbolic link from x to y

ln -s x y

to view all running processes

ps

to terminate process x (x is PID from ps)

kill x

Change file permissions

chmod <permissions> <file>

chmod -R 753 games
Permissions alias weightage read r

4

write

w

2

execute

x

1

In 753, the first 7 (1st letter) represents the permissions to himself, 5 (2nd letter) represents the permissions to group. 3 (3rd letter) represents the permissions to others. Options: -R for whole directory
7=4+2+1 ; 5=4+1; 3=2+1
Change file owner

chown <new owner> <file>

Change file group

chgrp <new group> <file>

Compress/uncompress files/directories

tar

tar -xvf file.tar -- uncompress a file 'file.tar' tar -xzvf file.tar.gz -- uncompress a file 'file.tar.gz' tar -xjvf

You May Also Find These Documents Helpful

  • Satisfactory Essays

    In the second column, list at least three processes (capabilities) necessary to keep track of your home CD or DVD collection. In the first column, identify the input data required for each process. In the last column, identify a logical name for each output data item and the type of output data: real number, integer, or text.…

    • 137 Words
    • 1 Page
    Satisfactory Essays
  • Satisfactory Essays

    NT1310 Unit 3 Homework

    • 1253 Words
    • 5 Pages

    tem. Each of these numbers identifies the command running in the background. It’s useful to know what jobs the program has completed and which ones are still running. The utility to use to run more than one command is “&”.…

    • 1253 Words
    • 5 Pages
    Satisfactory Essays
  • Powerful Essays

    NT1430 Lab2 Joy Brewer

    • 989 Words
    • 4 Pages

    11. What does grep do? The grep command is used to search text or searches the given file for lines containing a match to the given strings or words. By default, grep displays the matching lines…

    • 989 Words
    • 4 Pages
    Powerful Essays
  • Powerful Essays

    Unit 3 network discovery

    • 1031 Words
    • 5 Pages

    The shell tries to find an executable program with the same name as the command. When it does, the shell executes the program. When finishing the command put an & ampersand symbol at the end of the command and the command will run in the background. Then a cursor will be displayed immediately to allow the next command to be entered.…

    • 1031 Words
    • 5 Pages
    Powerful Essays
  • Good Essays

    If multiple people need access to one file, this is commonly done by placing the users into groups, and assigning the groups and users various levels of permission access. There is a hierarchy where groups are on top and access control lists are underneath. The groups are owner class, group class, and other class. The other privileges are read, write, and execute. When a user creates a file, they are automatically made the owner. They can grant others into the group class and other class. Directory lists have 10 spaces or bits on the left hand side. The first space on the left is either a ‘-‘ for file, or a ‘D’ for directory. Stallings (2012) stated,“ Nine of the protection bits specify read (r), write (w), and execute (x) permission for the owner of the file, other members of the group to which this file belongs, and all other users” (p.558). The first three are for owner, next three are for group and last three are for other.…

    • 680 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    Verilog

    • 317 Words
    • 2 Pages

    * The basic module of the adc will have an input, an output and a clock (clk) as part of the port list.…

    • 317 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    Argument Assignment Example

    • 9158 Words
    • 26 Pages

    5:30 traffic in Baton Rouge could easily be defined as the time in which no one wants to get in their car and go anywhere regardless of urgency. Baton Rouge, Louisiana is notoriously known for their inefficient traffic systems. Why is that? With a population rank of 67th in the United States, Baton Rouge’s ranking of 33rd in the nation for worst traffic congestion has definitely impacted the community’s identity (Meaux, Reveille).…

    • 9158 Words
    • 26 Pages
    Powerful Essays
  • Good Essays

    Any Bad Moment

    • 2957 Words
    • 12 Pages

    | (copy out) cpio -o reads the standard input to obtain a list of path names and copies those files onto the standard output.…

    • 2957 Words
    • 12 Pages
    Good Essays
  • Good Essays

    Java Programming Questions

    • 1971 Words
    • 8 Pages

    Using a case statement, write a shell program to read a command (eg., who, cal, ls, ps) from the user and execute it.…

    • 1971 Words
    • 8 Pages
    Good Essays
  • Satisfactory Essays

    Identifiers are names that are given to various program elements, such as variable, function and arrays. C take some reserved word called keyword, they have predefine meaning in C. Identifiers consist of letters and digits. Keyword consist only letter. Identifier’s first character must be a letter. Keyword’s all character is letter. Identifiers Upper and lowercase letter is use. Keywords are all lowercase. Upper and lowercase are not equivalent. Upper and lowercase are also not equivalent. Like: X, sum_5, _weather etc.…

    • 449 Words
    • 3 Pages
    Satisfactory Essays
  • Powerful Essays

    C Program

    • 2161 Words
    • 9 Pages

    // This file is a good place to add code for any additional processing that is…

    • 2161 Words
    • 9 Pages
    Powerful Essays
  • Satisfactory Essays

    |Change the permissions on this new file to add the execute bit for user, group, and owner. |…

    • 511 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    How to Give Instructions

    • 535 Words
    • 3 Pages

    2.The teacher says that they are going to learn imperative verb forms and body parts.…

    • 535 Words
    • 3 Pages
    Satisfactory Essays
  • Powerful Essays

    Basic Computer

    • 1446 Words
    • 6 Pages

    in the major financial markets operating a network of around 600 offices in 20 countries in the…

    • 1446 Words
    • 6 Pages
    Powerful Essays
  • Satisfactory Essays

    Good Command for English

    • 259 Words
    • 2 Pages

    Now, the world is becoming smaller than before just because of advancement of technology and knowledge. Every person has different ideas, knowledge and strength and wants to share them with other person.There is no accepted and established common language for all other than English. This is medium language between to languages and cultures. In the course of our business or work, any where in the world, there is always possibility to come across with the people of different languages and cultures and we can simplify this situation with the help of English.We can do nothing, without having a good command of English, if we intend to do something good we like, coming out from our home.…

    • 259 Words
    • 2 Pages
    Satisfactory Essays

Related Topics