0% found this document useful (0 votes)
27 views3 pages

Essential Linux Commands For Jenkins

This document outlines essential Linux commands for managing Jenkins, categorized into ten sections including file and directory management, file permissions, process monitoring, networking, file manipulation, package management, service management, environment variables, archiving, and scheduling. Each section provides specific commands along with examples for practical use. The commands are crucial for effectively operating and maintaining Jenkins on a Linux system.

Uploaded by

rafiashifa3
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views3 pages

Essential Linux Commands For Jenkins

This document outlines essential Linux commands for managing Jenkins, categorized into ten sections including file and directory management, file permissions, process monitoring, networking, file manipulation, package management, service management, environment variables, archiving, and scheduling. Each section provides specific commands along with examples for practical use. The commands are crucial for effectively operating and maintaining Jenkins on a Linux system.

Uploaded by

rafiashifa3
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Essential Linux Commands for Jenkins

1. File and Directory Management

---------------------------------

- ls: List files and directories.

- cd: Change directory.

- pwd: Print the current directory path.

- mkdir: Create new directories.

- rm: Remove files or directories (e.g., rm -rf <directory>).

- cp: Copy files or directories.

- mv: Move or rename files or directories.

- touch: Create empty files.

- cat: Display the contents of a file.

2. File Permissions and Ownership

----------------------------------

- chmod: Change file permissions (e.g., chmod 755 <file>).

- chown: Change file ownership (e.g., chown jenkins:jenkins <file>).

3. Process and System Monitoring

---------------------------------

- ps: Display running processes (e.g., ps -ef | grep jenkins).

- top or htop: Monitor system resources and running processes.

- kill: Terminate a process (e.g., kill -9 <PID>).

- df: Check disk space usage.

- du: Check directory size.


- free: Display memory usage.

4. Networking

--------------

- ping: Test network connectivity.

- curl: Test APIs and endpoints (e.g., curl -I http://localhost:8080).

- wget: Download files from a URL.

- netstat or ss: Check open ports and network connections.

5. File Manipulation and Logs

------------------------------

- tail: View the last lines of a file (e.g., tail -f /var/log/jenkins/jenkins.log).

- grep: Search text within files (e.g., grep "ERROR" /var/log/jenkins/jenkins.log).

- vim or nano: Edit configuration files directly on the server.

- find: Search for files and directories (e.g., find / -name jenkins.war).

6. Package Management

-----------------------

- Debian/Ubuntu: apt or apt-get (e.g., sudo apt-get install jenkins).

- Red Hat/CentOS/Fedora: yum or dnf (e.g., sudo yum install jenkins).

7. Service Management

----------------------

- systemctl: Manage system services (e.g., sudo systemctl start jenkins).

- service: Older command for managing services.

8. Environment and Variables


-----------------------------

- echo: Print text or variable values (e.g., echo $JAVA_HOME).

- export: Set environment variables (e.g., export PATH=$PATH:/opt/jenkins/bin).

- env: View all environment variables.

9. Archiving and Compression

-----------------------------

- tar: Create and extract archives (e.g., tar -czvf backup.tar.gz /var/lib/jenkins).

- unzip: Extract ZIP files.

10. Scheduling and Automation

------------------------------

- crontab: Manage scheduled tasks (e.g., crontab -e).

You might also like